Computer Homework done on Matlab

Description :

We will use Matlab for many homework problems. So that all homework has the same format, please use the following guidelines:

1. All matlab homework will be handed in on a 3 1/2 inch diskette for pc.

2. Programs should start with a short description. This should include:

  • a. What the program does.
  • b. What input the program needs (if any).
  • c. What the output is.
  • In describing the output, include the figures that are presented. Example:

    3. There should be only one .m file on the diskette. The name of the file should be hw*.m, where * is the homework number. For example, for homework 2, there should be one file called hw2.m on the diskette. If the homework has more than one part, these should be separated by comments, but in the same program.

    4. All programs should have clear as the first command.

    5. Graphs must have a title and a label for each axis.

    6. Place a pause command after each graph.

    7. Choose the x and y axes so that the information is presented in a way that is clear and easy to understand. If the x or y axis is too small or too large, it will be difficult to determine what is being presented. In the graphs below, a cosine with a frequency of 1Hz is shown with an x axis of 100 seconds in figure 1, then with an x axis of 0.5 second sin figure 2, and finally with an x axis of 3seconds in figure 3. As you can see the in the first two graphs, it is not clear that a cosine is being presented. Figure 3 clearly shows a cosine function. Unfortunately there are no rules that work for all cases, since the x and y axes depend on the figure being presented. This means that it is up to you to determine what is the best way to select the axes, and to select appropriate axes sizes.

    Figure 1

    Figure 2

    Figure 3

    8. If processing time is long, (more than 1 minute) then save the results in a .mat file and also include this in the work handed in.