Unrecognized function or variable 'bins'.
2 ビュー (過去 30 日間)
古いコメントを表示
I am workiong on a lab and when I run the command:
[~,R] = imnoise2(ones(100000,1),'gaussian',0,1);
hist(R, bins);
As instucted I get the error
Unrecognized function or variable 'bins'.
Error in Part6 (line 2)
hist(R, bins)
Any idea why?
0 件のコメント
回答 (1 件)
Image Analyst
2020 年 12 月 10 日
Because you never assigned any number to bins. Try
[~,R] = imnoise2(ones(100000,1),'gaussian',0,1);
bins = 256;
hist(R, bins);
or
[~,R] = imnoise2(ones(100000,1),'gaussian',0,1);
imhist(R);
or
[~,R] = imnoise2(ones(100000,1),'gaussian',0,1);
histogram(R, 256);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!