Why is my plot not showing?
Show older comments
I'm trying to plot some Fourier Exponential Series but everytime I run my script nothing is comming out.
This is my script, any ideas on what am I doing wrong?
clc; close all; clear all;
%%Periodic Signal: Parameters
A = 6;
T = 10;
Co = 0;
%%Obtain distance between times
Wo = 2 * pi / T;
t0 = T;
tf = 1.5 * T;
dt = tf /500;
t = 0 : tf : dt;
%%Square wave aproximation
Vt = Co * ones (size (t));
for n = 0 : 1 : 100
Cn = (4 * A / n*pi) * sin(n * pi/2);
Vt = Vt + Cn * exp(1j * n * Wo * t);
plot(Vt, t),...
xlabel('Time (s)'),ylabel('V(t)'),...
title('Aproximation '),grid on,...
hold on;
end
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!