Why does this error occur? Error using cwt>parseinputs (line 510) Invalid number of scalar input arguments. Error in cwt (line 297) fbcell = parseinput​s(Norig,TT​able,varar

3 次查看(过去 30 天)
function [f_low, f_high, dominant_freq] = autoIdentifyBandwidth(time, dispDataDetrend, sampFreq)
min_scale = 2;
max_scale = min(100, floor(length(dispDataDetrend)/2));
num_scales = 500;
scales = logspace(log10(min_scale), log10(max_scale), num_scales);
[cwt_coeffs, f] = cwt(dispDataDetrend, scales, ...
'Wavelet', 'bump', ...
'SamplingFrequency', sampFreq);
...

回答(1 个)

Chuguang Pan
Chuguang Pan 2025-8-21
编辑:Chuguang Pan 2025-8-21
You do not need to pass scales argument explicitly. The scales argument is excluded of cwt function's signature. The minimum and maximum scales are determined automatically based on the energy spread of the wavelet in frequency and time as illustrated in the documentation of cwt.
  1 个评论
zheng
zheng 2025-8-21
Thank you for your answer! I mainly want to increase the resolution of the output frequency, and for me, neither the frequency resolution of the default output nor the resolution increased by VoicesPerOctave is enough

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by