フィルターのクリア

Bug: size(I, 1)*size(I, 2) returns size(I, 1) Instead of Product

1 回表示 (過去 30 日間)
Apoorva Srivastava
Apoorva Srivastava 2019 年 6 月 24 日
回答済み: Steven Lord 2019 年 6 月 24 日
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

回答 (1 件)

Steven Lord
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.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by