フィルターのクリア

Undefined function 'mrdivide' for input arguments of type 'struct' error

3 ビュー (過去 30 日間)
ElizabethR
ElizabethR 2016 年 3 月 15 日
コメント済み: ElizabethR 2016 年 3 月 15 日
i have a code :
a=imread('a2.png');
bw=im2bw(a);
l=regionprops(bw,'Area');
b=20000;
m1=fix(m*sqrt(b/l));
but, i get the error :
Undefined function 'mrdivide' for input arguments of type 'struct'.
how to fix this ? please help. Thanks

採用された回答

Steven Lord
Steven Lord 2016 年 3 月 15 日
I'm assuming "l" is actually supposed to be "large" and that you changed one of them after copying and pasting your code but forgot to change the other. Anyway, REGIONPROPS returns a struct array. You can't divide by a struct array but you could divide by the contents of the fields of that struct array. See the second of the Tips on that documentation page for how to create a vector from the struct.
  1 件のコメント
ElizabethR
ElizabethR 2016 年 3 月 15 日
hi Steven, Thanks for answare my question.. oohh yeah, i mean that l is large. thank you so much for your explanation .. God Bless You :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by