Undefined function 'cwt' for input arguments of type 'double'.

6 ビュー (過去 30 日間)
Victor Lee
Victor Lee 2019 年 10 月 11 日
コメント済み: Star Strider 2019 年 10 月 11 日
I am currently conducting a CWT for my rail roughness. However, the errors keep showing "Undefined function 'cwt' for input arguments of type 'double'." Not sure if it is due to the input arguements for my roughamplitude? Any possible advice for cwt.
Below is my sample code
d2spectogram=xlsread('Nel20190802_MEAS35_displacement_results.xlsx');
dist=d2spectogram(:,4);
rough=d2spectogram(:,2);
rows = numel(dist);
sampdist = abs ((dist(rows) - dist(1)))/(rows-1);
totallength = dist(rows) -dist(1);
ylabel ('Roughness (um)');
xlabel ('Distance (m)');
windowsize=512;
window = hann(windowsize);
%window
nfft=2^nextpow2(windowsize); %size of the fft %hsv
noverlap=nfft*0.5; % 50% set for number of overlaps
fs_samp=1/0.001; %i have my sampling frequency
roughamplitude = rough - mean(rough); %focus on fluctuation
%continuous wavelet transform
%CWT of partial signal
[cwtW,cwtF]=cwt(roughamplitude,'amor',fs_samp);%morlet wavelength
cwtW_mag=abs(CwtW); %magnitutde cwt
cwtW_pow=cwtW_mag.^2;
figure
surf(t,cwtF,cwtW_mag,'EdgeColor','none');
colormap(jet);axis tight;view(0,90);
h=colorbar;ylabel(h,'Magnitude');
title('Wavelet transform of amplitutde signal');
xlabel('Time (s)'); ylabel('Frequency (Hz)');
surf(t,cwtF,cwtW_mag,'EdgeColor','none');
colormap(jet);axis tight;view(0,90);
h=colorbar;ylabel(h,'Magnitude');
title('Scalogram of amplitutde signal');
xlabel('Distance'); ylabel('Frequency (Hz)');
  3 件のコメント
Victor Lee
Victor Lee 2019 年 10 月 11 日
how do i go about installing the toolbox. seems like i do not have it.
"Warning: No properly formatted Contents.m file was found"
for 'wavelet'.
Star Strider
Star Strider 2019 年 10 月 11 日
That depends on the environment you are working in. If you are in a university, contact your license administrator. If you have an individual license, you will have to purchase it. Contact MathWorks Sales for more information.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeContinuous Wavelet Transforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by