Got Stuck In MATLAB

Thread Starter

the machinist

Joined Apr 1, 2021
17
Hi, I just wanted to plot this equation on MATLAB and here is my code:
clear;
clc;
close;
Vm=20;
t=(0:1/(f*100):1);
y = Vm*cos((2000 * pi * t) + pi/3);
plot(t,y);
figure(1);clf;
plot(t, y, '- r', 'LineWidth', 4),
hold on;
title('\bf\it Sinusoidal Wave', 'fontsize', (25)),
ylabel ('\bf Amplitude [V] ', 'fontsize', (20));

But, unfortunately I encountered with a blank graph page.

I could not find my error while trying to plot this equation on MatLab.
 
Last edited:
Top