![]() When the semilog command is implemented, depending on which axis is specified, one axis will remain on a linear scale while the other axis will switch to a logarithmic scale. > hist(variable, 3) The addition of the number after the variable in the command tells MATLAB how many bins there are to be in the histogram. Ten is the default number of bins and will always be used unless otherwise indicated. > hist(variable) This command creates a histogram with ten bins (cells). If > plot (x,y) had been used instead, Matlab would have plotted y vs. This does an x-y scatter plot with an 'o' marking each point. ![]() x on one graph > plot (x,y,'*',x,z,':') Plots y vs. > title ('whatever you want') Titles the graph (put anything you want inside of apostrophes) > xlabel ('the x-axis label') Labels the x-axis > ylabel ('the y-axis label') Labels the y-axis > grid Superimposes grid onto a graph > axis () Sets axis ranges > x= creates data set x = 1,5,8,3,10,7,3 > y = creates data set 'y' > plot (x,y,x,z) Plot y vs. Here is a list of some of the commands you will need for plotting graphs in Mathlab. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |