Starting from:

$25

EE5003 - Module 7 - MATLAB® Graphics -  Part 1 -   - Solved

M7 Exercise 

 

Instructions
1.    Utilize the MATLAB® implementation of the Fourier Series approximation of an even square wave (that you developed in Module 2), to develop a function M-file called “sq_wave_fourier_fn_LastName.m”. The input arguments are to be “freq,” “time,” and “N”; where freq = square wave frequency in Hz, time = vector of time points, N = number of terms in the Fourier Series approximation. The output of the function is the approximation of the square wave. Then create a driver program called “sq_wave_driver_LastName.m” that generates three different approximations (for N = 3, 9 and 29) of a 1 Hz square wave and plots them on three separate subplots. Obviously your driver program should call your function m-file to generate the approximations.

2.    Similar to the helix example described in MATLAB®’s help information for PLOT3, create a 3D plot of the following parametric function:

  Your program should be named “helix_driver.m” and should create five different views of the function: MATLAB® default 3D view, MATLAB® default 2D view, the X-Z plane, the Y-Z plane, and a customized view of your choice that you have decided provides the most accurate 3D view of the function. Remember the command ‘figure’, issued all by itself, creates a new figure window without destroying previously existing figures.
 

More products