facing problem in plotting spectrogram.everytym an error occurs irrespective of the correct coding

3 visualizaciones (últimos 30 días)
i am unable to plot the spectrogram of a given signal.please help me.i am using the following codes.... t=0:0.001:2; y=chirp(t,0,1,150); spectogram(y,256,1e3,256,250,'y axis'); subplot(2,1,1); title('Quadratic Chirp');
pls help..

Respuesta aceptada

Paulo Silva
Paulo Silva el 3 de Jul. de 2011
t=0:0.001:2;
subplot(2,1,1); title('Quadratic Chirp');
y=chirp(t,0,1,150);
spectrogram(y,256,250,256,250,'yaxis');
  1. spectrogram misspelled
  2. wrong use of the subplot, it's before not after doing the drawing
  3. bad parameters on the spectrogram function
  6 comentarios
abhinav priyanshu
abhinav priyanshu el 4 de Jul. de 2011
thanx a ton..i worked..
btw this was the error..
??? Attempt to execute SCRIPT spectrogram as a function..
but now its working..thanx..:)
Paulo Silva
Paulo Silva el 4 de Jul. de 2011
that's what you get when using the names of functions on scripts, bad idea, same goes for variables with same name of functions, bad idea!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre AI for Signals 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