Teaching and Assessment Resources for MATLAB and Simulink · Assignment grading Resources Teaching...

Preview:

Citation preview

1© 2016 MathWorks, Inc.

Teaching and Assessment Resources

for MATLAB and Simulink

Brad Horton

Engineer

MathWorks Australia

Jonathan Koay

Academic Account Manager

MathWorks Australia

2

prologue:

yay or yawn

3

As a teacher, what I want to do, is:

a) I want my students to derive (by

hand), the transfer function and

UNIT step response of the RC

circuit.

b) I want my students to use this as an

exercise to practice their MATLAB

coding skills.

c) …. And I want to try something

NEW.

– I want my students to confirm their

hand derivations against a FUN

looking simulation environment called

Simulink + Simscape

T4+2

4

The old and something NEW:

DEMO #1:

– A set of typical MATLAB assignments

Ordinary Least Squares

An RC circuit

DEMO #2:

– A new thing that you’d like your students to try:

Simscape looks like FUN ?

Demo:

5

…. And as a teacher, you’re now asking:

How can I give my students some training on

how to drive Simulink + Simscape ?

– Surely someone’s put together some curriculum content

that I can use !

– I don’t really want to spend 3 hours preparing more

course notes and handouts.

I’ve got 200 students

– I want all of them to be confident using MATLAB

– If I set them MATLAB programming assignments …. I’ve

got some marking to do

– Wish I could “take their temperature” quickly.

Perhaps a POP QUIZ before I hand out the first real assignment ?

6

Act 0.0:

We can help

7

This session has 2 main themes:

Assignment

grading

Resources

Teaching

Resources

Test and assess, how

well your students

understand MATLAB.

How can

we help

you

Find existing Curriculum

content to supplement your

own content.

How can

we help

you

8

Act 1.0: Assignment

grading

Resources

Test and assess, how

well your students

understand MATLAB.

How can

we help

you

9© 2016 MathWorks, Inc.

Cody Coursework™

http://coursework.mathworks.com

10

What is Cody Coursework™?

Create online private courses and assignments

Students execute MATLAB code on the web

Control the visibility of the test suites from students.

Visualize solution results using MATLAB graphics

Download all student attempts and report on grading

data

Online automated grading system for

MATLAB assignments

http://coursework.mathworks.com

11

Are classical assessment techniques FINISHED ?

NO – of course not !

But ….. Cody can act as a Supplement to

your existing assessment formats

Cody sweet spots:

– Assess MATLAB programming assignments ?

– Do you need to mark 100’s of 1st or 2nd year

assignments ?

– Do you want to see where your students are

struggling before they submit ?

T3

12

Act 1.1:

the student meets

CODY

13

Student Workflow – the choices

CODE directly in web page

OR

Copy and

paste CODE

14

If you have WEB access

then demo it live !

15

The student gets invited

by Professor to enrol

in a COURSE

The student inspects the

invitation

A free MathWorks account is

required

16

The student

enrols in your

course

17

Student is now

ready to do the

Assignments.

18

Student Workflow

• Select a problem

• Enter a solution

• Test the solution

• Fix and retest the solution

• Submit their solution

19

The student experience

zzz

OK, let’s try and solve a problem

20

The student experience

… OK, I’ll type my

answers in here

So how do I know if this

answer is correct ?(which it isn’t !!)

21

The student experienceTry … try … try again !!

22

The student experience

Yeah .. OK I’m ready to

submit my answer for

this question.

23

The student experience

Will I encounter scenarios where my

Professor designs an assignment using

language like:

Q3.) Use the results of Q1 and Q2, to ……

Yes absolutely.

But your Professor can also choose

to cut you some slack

24

The student experience

Hey thanks Prof !

25

The student experience

So you want me to

DERIVE the analytical

form of the transfer

function ?

I thought this was

supposed to be about

MATLAB programming ?

26

The student experience

T4

27

The student experience

OK Prof, I’ve derived

your transfer function.

So what am I supposed

to do with it now ?

28

The student experience

c

OK … I’ll type it how I

wrote it !!

29

The student experience

Typing in (copy paste) a

few lines is OK …..

But I thought this was

supposed to be about

MATLAB programming ?

30

The student experienceSo you want me to write

a function ?

OK ….. This is new !

31

The student experience

Hey thanks

Prof !

32

The student experience

HIDDEN tests:

All I see is a GREEN or an ORANGE

(with a suggestion about my mistake)

VISIBLE tests:

I get to see my Professors code AND my

professor can create MATLAB plots.

33

The student experience Cool – I can quickly see what I’ve done

correctly and what still needs to be

improved

34

Act 1.2 :

some warmup

stretches

35

Pattern #1:

is*()

36

Pattern #2:

all()

37

Pattern #3:

length()

size()

38

Pattern #4:

assert()

everything is OK

everything is NOT ok

39

So what ?

These patterns (and a few others):

– is*()

– all()

– length()

– size()

– assert()

– ==,~=, <,>

YOU (the professor) use

these

concepts

to author the test suites

in

Cody Coursework

40

Act 1.4:

the Professor meets

CODY

41

CODY terminology

Course

MECH_123

Assignment_01

Problem_01

Problem_02

Assignment _02

Problem_01

Problem_02

Course

Assignment

problem

Course

MATH_121

Assignment_01

Problem_01

Problem_02

Assignment _02

Problem_01

Problem_02

Course

PHYS_456

Assignment_01

Problem_01

Problem_02

Assignment _02

Problem_01

Problem_02

42

Cody Coursework for Instructors

Follow these steps to prepare a course:

For an example of preparing a course, see the Instructor Walkthrough

So you own the

creation of tests that

get applied to your

students answers.

43

Cody Coursework for Instructors

Follow these steps to prepare a course:

Start

From scratch

Use examples

from our Catalog

44

The professor experience:

Login to CODY

coursework

https://coursework.mathworks.com

45

Choices:

46

If you have WEB access

then demo it live !

47

The professor experience:

Create a

course

48

The professor experience:

Configure the

course – part 1 of 2

Which products

will your students

have access to.

49

The professor experience:

Configure the

course – part 2

of 2Use edit box

and formatting

widgets

50

The professor experience:

Add and

configure an

Assignment

51

The professor experience:

Add a

problem to

your

assignment

52

The professor experience:

Configure a problem – part 1 of 6

Use edit box

and formatting

widgets to

state the

problem.

53

The professor experience:

Configure a problem – part 2 of 6

Do you want your students to work

on a SCRIPT or FUNCTION ?

What’s the starting

point for your

students ?

54

The professor experience:

Define the GOLDEN

REFERENCE that we

will compare our

students answers

against.

While you’re developing

your TEST SUITE you

can create some

example responses that

a student might submit.

Configure a problem – part 3 of 6

The GOLDEN

REFERENCE

solution

55

The professor experience:

Configure a problem – part 4 of 6

Do you want your

students to SEE the

code that you are using

to test their answers ?

Define your

TESTS

56

The professor experience:Define your

TESTS

Run the students solution

%% Test the values of yvec

run(‘solution’)

reference.solution

some_tf_list = abs(GR.yvec - yvec) < GR.tol;

assert( all(some_tf_list), 'your <yvec> values are NOT correct');

Run your GOLDEN reference solution

Perform some kind of test

ASSERT that your test was TRUE

Test pattern for SCRIPT problems

MUST start with a %%

57

The professor experience: Define your

TESTS

Run the students solution

%% TEST for a general input vector

t = [0:0.001:20]';

[studs_v2] = my_func_for_Q1d(t);

[v2] = reference.my_func_for_Q1d(t); % REFERENCE solution

% now do some detailed tests and echo feedback

assert( length(studs_v2)==length(t), ' your answer should have the

same number of elements as t values' );

the_e = abs(v2(:) - studs_v2(:));

assert( all(the_e < 1e-6), 'your step response values seem wrong' );

Run your GOLDEN reference solution

Perform some kind of test

ASSERT that your test was TRUE

Test pattern for FUNCTION problems

MUST start with a %%

58

The professor experience:Define your

TESTS

IFF necessary, define any data

that ALL of your test cases can

see

A whole bunch

of test cases

59

The professor experience:Define your

TESTS

OR

OR

BOTH

60

The professor experience:

Configure a problem – part 5 of 6

Test your TESTS

Get confidence in your TESTS.

Do they work ?

61

Publish The Problem

Once the problem is defined and tested,

click the Publish button to make the

problem available as part of the

assignment.

You can also save the problem as a

draft and return to work on it latter.

Clicking on the Preview button, allows

you to see what it will look like to the

students.

Configure a problem – part 6 of 6

62

Repeat this creation process for each problem

63

Act 1.5:

Professor invites

students to his CODY

course

64

Invite Students

Inviting Students to participate in

the course is as easy as …

1. Click on PEOPLE

2. Select Invite People tab

3. Select Student from the drop

down box

4. Enter the email addresses of the

students in the edit box

5. Click Send

T5

65

Invite Students

Inviting Students to participate in

the course is as easy as …

1. Click on PEOPLE

2. Select Invite People tab

3. Select Student from the drop

down box

4. Enter the email addresses of the

students in the edit box

5. Click Send

T5

66

Invite Students

Inviting Students to participate in

the course is as easy as …

1. Click on PEOPLE

2. Select Invite People tab

3. Select Student from the drop

down box

4. Enter the email addresses of the

students in the edit box

5. Click Send

By hand … or

COPY and paste

from file

67

The student gets your

invitation

The student inspects the

invitation

A free MathWorks

account is required

68

The student

enrols in your

course

69

And now they are

ready to do the

Assignments

70

Course enrolment only needs to be done ONCE !

Once enrolled in a course

– Assignment HYPERLINKS can be used for student access to new assignments

https://coursework.mathworks.com/courses/1840-bh0123-matlab-science-and-

systems/assignments/4875-assignment_02-linear-systems

Use these Assignment HYPERLINKS in your LMS

71

Act 1.6:

Professor monitors

student group

progress

72

Progress being made on

Problems in the Assignment

For each problem, the status bar shows:

• number of students who solved a problem correctly.

• number of students who have only submitted an incorrect solution.

• number of students that didn't submit any solutions for a problem.

73

Solution map for a Problem

Order of arrival

Co

de

siz

e

74

The interactive Solution map for a Problem

Click on a submission

See the code of the submission

See which tests were passed and failed

75

Generate a report for

your class’s Assignment

76

Generate a report for your class’s Assignment

77

This session has 2 main themes:

Assignment

grading

Resources

Test and assess, how

well your students

understand MATLAB.

How can

we help

you

Teaching

Resources

Find existing Curriculum

content to supplement your

own content.

How can

we help

you

78

Act 2.0:

Teaching

Resources

Find existing Curriculum

content to supplement your

own content.

How can

we help

you

79

Educators:

http://www.mathworks.com.au/academia/educators.html

A dedicated site for

supporting teachers.

80

MATLAB Courseware

http://www.mathworks.com.au/academia/courseware

81

MATLAB Courseware

http://www.mathworks.com.au/academia/courseware

82

Educators – Classroom resources:

http://www.mathworks.com.au/academia/classroom-resources/search.html

Search the

entire resource

library

Find a broad

range of

resources:

– A few scripts,

functions

– Libraries,

toolboxes

83

Learn MATLAB at your own pace.

http://au.mathworks.com/academia/student_center/tutorials

Video tutorials

84

MATLAB Academy ---- MATLAB Onramp

https://matlabacademy.mathworks.com/

Interactivetutorials

85

MATLAB Academy ---- MATLAB Onramp

https://matlabacademy.mathworks.com/

Interactivetutorial

Free

86

The Final Act:

Next Step?

87

This session had 2 main themes:

Assignment grading

ResourcesTeaching Resources

How can

we help

you

How can

we help

you

https://coursework.mathworks.com http://www.mathworks.com.au/

academia/courseware

88

APPENDIX

89

What you need ! http://au.mathworks.com/help/coursework/

Recommended