Arbitrary periodic signal in Simulink
4 views (last 30 days)
Show older comments
Hi!
Is it possible to generate arbitrary periodic signal in Simulink? For example, I want to generate voltage signal [tex] e(t)= \sum_{n=1}^{\infty}\frac{2}{n}(-1)^{n+1}\sin{(nt)} [\tex] (Fourier series of sawtooth waveform). I wrote m-file to graph this voltage signal:
clear
clc
t=linspace(0,2*pi,1000);
suma=0;
for n=1:10000
suma=suma+((2./n).*(-1).^(n+1)).*sin(n.*t);
end
plot(t,suma)
grid
Any idea?
0 Comments
Answers (0)
See Also
Categories
Find more on Spectral Measurements 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!