0% found this document useful (0 votes)
13 views

1.4 Section Wrap-Up _ 1. First Steps with Numeric Data _ MATLAB Essentials _ edX

1.4 Section Wrap-Up _ 1. First Steps with Numeric Data _ MATLAB Essentials _ edX
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

1.4 Section Wrap-Up _ 1. First Steps with Numeric Data _ MATLAB Essentials _ edX

1.4 Section Wrap-Up _ 1. First Steps with Numeric Data _ MATLAB Essentials _ edX
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

21/3/23, 23:24 1.4 Section Wrap-Up | 1.

First Steps with Numeric Data | MATLAB Essentials | edX

A "Quick Reference and Things to Try Out" unit is included at the end of every section. It has all the
commands used in this section and some additional things for you to try out on your own.

Quick Reference
The table below collects all used commands or important concepts with links to the documentation.

plot(x,y) Creates a two-dimensional line plot

scatter(x,y) Creates a scatter plot

save filename.mat Save Workspace variables to file

load filename.mat Load variables from the file into Workspace

hold on, hold off Retain current plot when adding new plot

xlabel(str) Label x-axis

ylabel(str) Label y-axis

title(str) Add a title to the plot

legend(str1,str2,…) Add a legend to axes

pie(x,labels) Create a pie chart

bar(x) Create a bar chart

grid on Display axes grid lines

+, - , .*, ./, .^ Basic element-wise vector math operators

[], start:spacing:end Basic vector creation

', .' (Conjugate) Transpose

linspace(start,end,numberOfElements) Creates a linearly spaced vector

length Returns length of the vector

size Returns number of rows and columns of a vector

round Round to nearest decimal or integer

Things to Try Out


Here are some new things to try out. Let us know in the forum if you run into any issues with these
tasks.

Add formatted text to a live script such as a numbered list

Add an equation, hyperlink, and an image to a live script

Use a data tip to see the value of a data point in a plot

Zoom in to a plot along only the x-axis or y-axis (click and drag horizontally or vertically with
Zoom In selected)

Create a plot with three or more lines and include labels and a legend

Use indexing to change values of elements in a vector

https://learning.edx.org/course/course-v1:MathWorks+intro_matlab+2T2021/block-v1:MathWorks+intro_matlab+2T2021+type@sequential+block@f1eec3ba2c1a45f2820ff1165df894d5/block-v1:MathWorks+intro_matl… 2/3

You might also like