Effacer les filtres
Effacer les filtres

Vectors must be the same length

2 vues (au cours des 30 derniers jours)
Draghici Bogdan-Gabriel
Draghici Bogdan-Gabriel le 30 Mai 2020
Hello, I've tryed few things but nothing is working can you help me, please ?
%% b
Xf=fft(x);
Ak=abs(Xf(n+1))/N;
T0=1/Fs;
w0=2*pi/T0;
Ts=1/1024;
Ak_t=fsAnalysis(x,t,T0,Ts,20);
figure;
plot(n(1:20)+1, Ak_t, 'b*'), axis([0 20 0 0.0005]);
xlabel('k'),ylabel('Ak_t(k)');
hold on;
plot(n(1:20)+1,Ak(1:20), 'r*');
legend('M. fft','M. trapezelor');
title ('FFT+ Trapeze');
ERROR
'Error using plot
Vectors must be the same length.
Error in Lab13 (line 38)
plot(n(1:20)+1, Ak_t, 'b*'), axis([0 20 0 20]);'

Réponses (1)

Sai Sri Pathuri
Sai Sri Pathuri le 30 Mai 2020
Check whether n(1:20)+1 and Ak_t have same number of elements.
  1 commentaire
Draghici Bogdan-Gabriel
Draghici Bogdan-Gabriel le 30 Mai 2020
solved it, thanks

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by