Bug: size(I, 1)*size(I, 2) returns size(I, 1) Instead of Product
1 回表示 (過去 30 日間)
古いコメントを表示
I = imread('image.png');
Why does
size(I, 1)*size(I, 2)
return the value of size(I, 1) instead of the product? It gives the product if I do
a = size(I, 1);
b = size(I, 2);
a*b
0 件のコメント
回答 (1 件)
Steven Lord
2019 年 6 月 24 日
This works for me. Let's make sure you haven't overloaded the size function. What does this command return?
which -all size
Also check if the variable I has size 1 in the second dimension.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!