- Fourier Series - https://www.mathworks.com/help/curvefit/fourier.html
- Fit function - https://www.mathworks.com/help/curvefit/fit.html
Plotting cycles of signal
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
z(t) = ( t if − π ≤ t < 0 )
( 1 if 0 ≤ t ≤ π )
How do i plot 3 cycles of the above signal and find the fourier series
0 commentaires
Réponses (1)
Surya Talluri
le 6 Août 2020
I understand that you want to plot 3 periods of the signal and obtain its Fourier Series.
t = [-pi:0.1:0 0:0.1:pi];
z = [-pi:0.1:0 ones([1, numel(0:0.1:pi)])];
t3 = [t t(2:end)+2*pi t(2:end)+4*pi];
z3 = [z z(2:end) z(2:end)];
plot(t3,z3)
ylim([-pi, pi])
xlim([-pi, 5*pi])
grid on
You can obtain Fourier series coefficients of a signal by using fit function in our Curve Fitting Toolbox or by using Curve Fitting App.
f = fit(t3',z3', 'fourier8');
plot(f, t3, z3)
You can find the fourier coefficients and their values with coeffnames and coeffvalues functions.
You can access the following documentation for further understanding:
0 commentaires
Voir également
Catégories
En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!