Lecture15_Plotting_I

Tutorials:
Matlab has many plotting functions, we'll explore a few today:


Please note the marked area, and look at the code above, you will know how to make it yourself next time.



Summarize a few properties:


Useful things summarized below:








Look at the plot() function, you will know what you can do with it.


A good example:






A good example:



A comprehensive example:



Multiple plots!!!!!!!!!!!!!!! Super useful:





























Task 1: Do the following plotting on your side:



Typo Alert:



You shold expect this:


Report the figure in the following ways:

1) Go to Edit - Copy Figure. Then create a new MS Word file, to paste (ctrl V) the figure into the doc file and save it. Send the doc file along with your published script for credit.

2) Save the figure as .fig file as shown below, send it along with your published script for credit.


Task 2: Do the following task:
Use MatLab to plot cos(x) and sin(x) in the same figure. The range of x is 0:2*pi, and there are 40 dots are being plotted. Your plot should have:
• Two different markers for the two functions
• Two different colors for the two lines
• Have appropriate labels for both X and Y axis
• A modified line width
• Have legends to indicate the two curves are cos(x) and sin(x)
 

Beyond the requirements, you can add your own ideas that can make the figure more readable and clear for other people.