How to change time interval value when using instfreq function in Matlab ?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Yihan Ma
el 30 de Jul. de 2019
Comentada: Yihan Ma
el 27 de Ag. de 2019
When I want to use instfreq function to acquire average frequency versus time,
eg. [frequency, time]=instfreq(signal,fs);
here if my signal length is 2240 points, and my sample frequency fs is 16Hz, my time interval is always 2.125s, and the length is always 63.
I find that time interval is fixed. I try several format about this function, but I fail to change the time interval.
I wounder if any other methods could help me to acquire feasible time interval in this function?
0 comentarios
Respuesta aceptada
SaiDileep Kola
el 2 de Ag. de 2019
Editada: madhan ravi
el 2 de Ag. de 2019
You can customize the time interval using Frequency Resolution, to quote an example
To explain from your case
fs = 16;
t = (0:1/fs:140-1/fs)';
x = sin(2*pi*200*t) + randn(size(t))/4; %this is the signal I have taken to explain
instfreq(x,t) % gives default time interval
%instead you can do as below
[p,fd,td] = pspectrum(x,t,'spectrogram','FrequencyResolution',40);
% the last argument is to customize the time interval
% you get the range of argument when you execute the command if it exceeds the range
[f1,t1]=instfreq(p,fd,td);
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!