216k views
4 votes
Investigate the periodicity of cos() sin() using appropriate MATLAB plots where ∈ .

a. First, create an appropriate t row vector.
b. Then, plot both sine and cosine functions on separate figures including a title, axis labels, and units.
c. Finally, plot both of them on the same plot using subplot command.
d. Comment on the results, are they periodic, are their periodicity different from each other, are their fundamental period the same?

User L Ja
by
8.1k points

1 Answer

4 votes

Final answer:

To investigate the periodicity of cos() and sin() using MATLAB, create a time vector, plot the functions separately, and then plot them together on the same plot. Both functions are periodic with the same fundamental period of 2π.

Step-by-step explanation:

Investigating the periodicity of cos() and sin() in MATLAB

To investigate the periodicity of cosine and sine functions using MATLAB, follow these steps:

  1. Create a time vector using the t span you want to investigate.
  2. Plot the cosine function using the cos() function and the time vector you created. Add a title, axis labels, and units to the plot.
  3. Plot the sine function using the sin() function and the time vector you created. Add a title, axis labels, and units to the plot.
  4. Use the subplot command to plot both the cosine and sine functions on the same plot. Add a title, axis labels, and units to the plot.

Once you have plotted the functions, observe the results. Both the cosine and sine functions are periodic, meaning they repeat themselves after a certain interval of time. The fundamental period of both functions is the same, which is 2π. However, their shapes and amplitudes may be different.

User Eissa
by
8.5k points