Borrar filtros
Borrar filtros

plotting error: Vectors must be the same length.

1 visualización (últimos 30 días)
nana rosd
nana rosd el 21 de Feb. de 2020
Comentada: fred ssemwogerere el 21 de Feb. de 2020
[SIGNAL, SAMPLERATE]=audioread(file);
SIGNAL = SIGNAL(:,1);
dt = 1/SIGNAL;
t = 0:dt:(length(SIGNAL)*dt)-dt;
plot(t,SIGNAL);
xlabel('Seconds');
ylabel('Amplitude');
figure
plot(psd(spectrum.periodogram,SIGNAL,'Fs',SAMPLERATE,'NFFT',length(SIGNAL)));
sound(SIGNAL, SAMPLERATE);
error message:
Error using plot
Vectors must be the same length.
Error in Recognizer (line 17)
plot(t,SIGNAL);
I want to plot my audio signal, but I get this error. anybody can help me?
thanks
  1 comentario
fred  ssemwogerere
fred ssemwogerere el 21 de Feb. de 2020
There seems to be some confusion in your code, purely based on line 2 and line 3 of your code. Is SIGNAL a scalar or vector?
Line 2 seems to imply that SIGNAL is a vector, while Line 3 seems to imply SIGNAL is a scalar. Please check your code

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Spectral Measurements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by