How do i plot scalogram 3d

26 visualizaciones (últimos 30 días)
Vishwaajith Pemmasani
Vishwaajith Pemmasani el 16 de Abr. de 2021
Editada: Abhishek Gupta el 19 de Abr. de 2021
Unrecognized function or variable 'helperPlotScalogram3d'.
This is the error I am getting. Pls guide me how to use function to plot scalogram 3d in the time frequency analysis

Respuestas (1)

Abhishek Gupta
Abhishek Gupta el 19 de Abr. de 2021
Editada: Abhishek Gupta el 19 de Abr. de 2021
Hi,
This error indicates that MATLAB doesn't recognize the 'helperPlotScalogram3d' as the name of a function on the MATLAB path.
One possible workaround would be to save the code (given below) of "helperPlotScalogram3d" in your current directory and rerun your script.
function helperPlotScalogram3d(sig,Fs)
% This function is only intended to support this wavelet example.
% It may change or be removed in a future release.
figure
[cfs,f] = cwt(sig,Fs);
sigLen = numel(sig);
t = (0:sigLen-1)/Fs;
surface(t,f,abs(cfs));
xlabel('Time (s)')
ylabel('Frequency (Hz)')
zlabel('Magnitude')
title('Scalogram In 3-D')
set(gca,'yscale','log')
shading interp
view([-40 30])
end
You can also find the code and the documentation of "helperPlotScalogram3d" function here. For more information related to the error, check out the following MATLAB Answer link:-

Community Treasure Hunt

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

Start Hunting!

Translated by