Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,780 --> 00:00:05,435
Hello, this tutorial is designed to
introduce students to MATLAB Online and
2
00:00:05,435 --> 00:00:10,000
its use in solving the programming
assignments for this course.
3
00:00:10,000 --> 00:00:14,721
The goal of these assignments is to
help in visualizing the key concepts
4
00:00:14,721 --> 00:00:16,301
taught in this course.
5
00:00:16,301 --> 00:00:17,816
Let's get started.
6
00:00:17,816 --> 00:00:20,833
The first thing that we observe
is a problem description,
7
00:00:20,833 --> 00:00:25,610
where details regarding the assignment and
its requirements are mentioned.
8
00:00:25,610 --> 00:00:30,785
This section often contains links to
download files for your desktop MATLAB.
9
00:00:30,785 --> 00:00:35,555
We recommend using the desktop version
frequently when building your solutions,
10
00:00:35,555 --> 00:00:39,041
as it helps to inspect your variables and
develop your code.
11
00:00:39,041 --> 00:00:42,120
For function problems,
there are two code boxes.
12
00:00:42,120 --> 00:00:46,032
The first code box is where you implement
the constants for the assignment and
13
00:00:46,032 --> 00:00:49,400
it'll often contain some
code to get you started.
14
00:00:49,400 --> 00:00:51,820
The second code box is for testing.
15
00:00:51,820 --> 00:00:56,050
This box will consist of some
code to test your function, but
16
00:00:56,050 --> 00:00:58,380
can be modified to test for
different scenarios.
17
00:00:59,410 --> 00:01:03,930
The Run Function button runs the code
to call your function box and
18
00:01:03,930 --> 00:01:05,960
displays any output there.
19
00:01:05,960 --> 00:01:09,850
The Submit button tests your function and
returns the result.
20
00:01:09,850 --> 00:01:10,820
Let's see how this works.
21
00:01:11,860 --> 00:01:17,095
In this example, we are going to create
a location matrix above the z-axis for
22
00:01:17,095 --> 00:01:18,840
a given angle in radians,
23
00:01:18,840 --> 00:01:22,829
which is given by the equation
in the problem description.
24
00:01:22,829 --> 00:01:27,567
So our task is to create a matrix
according to the formula shown.
25
00:01:27,567 --> 00:01:29,722
Let's go ahead and plug in the formula.
26
00:01:33,882 --> 00:01:36,362
Now that I think my function is done,
27
00:01:36,362 --> 00:01:41,489
let's use the Run Function button to
test if my function works as expected.
28
00:01:41,489 --> 00:01:45,928
Always test a function before
pressing Submit to make sure there
29
00:01:45,928 --> 00:01:48,319
aren't any syntactical errors.
30
00:01:48,319 --> 00:01:52,700
Great, our function runs and
we see the rotated vector.
31
00:01:52,700 --> 00:01:57,465
Remember, we can modify this code to
test the function multiple times.
32
00:01:57,465 --> 00:02:01,802
Let's go ahead and change the vector and
run this code again.
33
00:02:05,796 --> 00:02:09,092
Now that we think our function's correct,
let's hit Submit.
34
00:02:15,076 --> 00:02:17,561
Oops, looks like we made a mistake.
35
00:02:17,561 --> 00:02:20,046
Notice the two levels of feedback.
36
00:02:20,046 --> 00:02:23,918
The feedback in red directly
is from creating code.
37
00:02:23,918 --> 00:02:28,381
The feedback in brown is a additional
set of hints provided regarding possible
38
00:02:28,381 --> 00:02:29,470
errors.
39
00:02:29,470 --> 00:02:33,350
So in this case,
I have the error because of negative sine.
40
00:02:33,350 --> 00:02:35,399
Let me update the code and try again.
41
00:02:42,290 --> 00:02:44,738
Great, now we have all green checks,
42
00:02:44,738 --> 00:02:48,115
implying we have successfully
passed the problem.
43
00:02:50,557 --> 00:02:52,880
Don't worry if you get stuck.
44
00:02:52,880 --> 00:02:54,910
Code rarely works the first time and
45
00:02:54,910 --> 00:02:57,280
the problems in this course
are quite challenging.
46
00:02:57,280 --> 00:02:59,890
So pat yourselves on the back
when you get them right.
47
00:02:59,890 --> 00:03:03,819
When you want to get help in the forum,s
include three things in your post.
48
00:03:03,819 --> 00:03:07,734
The assessment descriptions that failed or
that you have questions on.
49
00:03:07,734 --> 00:03:09,569
The red error message returned.
50
00:03:09,569 --> 00:03:13,718
Now this can vary from the type of error,
description of error probed or
51
00:03:13,718 --> 00:03:16,920
pseudocode outlined in your approach.
52
00:03:16,920 --> 00:03:21,680
Please do not post any actual code in
the forums even if it is not working.
53
00:03:21,680 --> 00:03:22,180
Thank you.4579
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.