Exercises
Use Matlab's help system to answer each of the following questions.
-
What is the minimum number of input parameters required to plot something using the
plotcommand?Answer: You need at a minumum one y-coordinate value to plot. The command
plot(y)plots the point (1,y). -
Is
wheata color that can be used in a two dimensional plot?Answer: No. For a list of color that can be used, type
help plotin the command window and read results. Or, search the interactive help for "LineSpec" to see options for each set of plot points. -
What are the units of the return value of the
sincommand?Answer: No units, a value between 0 and 1.
-
What character is the transpose operator?
Answer: The apostrophe (
') character. -
What is the difference between the
docand thehelpcommands?Answer: The results of the
helpcommand are displayed inline in the Command Window; while the results of thedocdocument are shown in a new popup window. -
Is
&a special character in Matlab. Hint: Search help for "special characters".Answer: No, but it is a punctuation character and it can't be used in a variable or function name.