Exercises

Use Matlab's help system to answer each of the following questions.

  1. 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).

  2. 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.

  3. What are the units of the return value of the sin command?

    Answer: No units, a value between 0 and 1.

  4. What character is the transpose operator?

    Answer: The apostrophe (') character.

  5. What is the difference between the doc and the help commands?

    Answer: The results of the help command are displayed inline in the Command Window; while the results of the doc document are shown in a new popup window.

  6. 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.