Error using plot: Value not a numeric scalar
古いコメントを表示
I am using this running average function to smooth out dome noisey data.
function y = RunningAvg(x,w)
wts = ones(1, w) / w
new = conv(x, wts, 'same');
end
However, when I plot the filtered signal, I get this error massage
Error using plot
Value not a numeric scalar
7 件のコメント
David Hill
2020 年 1 月 31 日
Please provide example inputs (x,w) to your function. There is no y that is returned.
Walter Roberson
2020 年 1 月 31 日
編集済み: Walter Roberson
2020 年 1 月 31 日
we need to see the plot call
Romio
2020 年 1 月 31 日
Walter Roberson
2020 年 1 月 31 日
It appears that w would be expected to be a positive integer. But we still need to see the call to plot()
Romio
2020 年 1 月 31 日
Romio
2020 年 1 月 31 日
Walter Roberson
2020 年 1 月 31 日
Yes, it was that line
plot(t,x_smoothed,'linewidth','2')
that we were looking for.
回答 (1 件)
Walter Roberson
2020 年 1 月 31 日
plot(t,x_smoothed,'linewidth','2')
Line widths must be numeric.
plot(t,x_smoothed,'linewidth',2)
2 件のコメント
Romio
2020 年 1 月 31 日
Bahubalendruni Bindu Satya Narayana Sai Varma
2021 年 5 月 26 日
Thank you
カテゴリ
ヘルプ センター および File Exchange で Electrical Block Libraries についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
