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
plot
command?Answer: You need at a minumum one y-coordinate value to plot. The command
plot(y)
plots the point (1,y). -
Is
wheat
a color that can be used in a two dimensional plot?Answer: No. For a list of color that can be used, type
help plot
in 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
sin
command?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
doc
and thehelp
commands?Answer: The results of the
help
command are displayed inline in the Command Window; while the results of thedoc
document 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.