フィルターのクリア

Force get 3*4 matrix

1 回表示 (過去 30 日間)
Dani D
Dani D 2017 年 2 月 17 日
編集済み: James Tursa 2017 年 2 月 17 日
Hello, I want force user input exactly 3*4 matrix. other size is unacceptable.

採用された回答

James Tursa
James Tursa 2017 年 2 月 17 日
x = the user input
if( ~isequal(size(x),[3 4]) )
error('Size must be exactly 3x4')
end
  2 件のコメント
Guillaume
Guillaume 2017 年 2 月 17 日
編集済み: James Tursa 2017 年 2 月 17 日
or
validateattributes(x, {'numeric'}, {'size', [3 4]})
James Tursa
James Tursa 2017 年 2 月 17 日
+1 Guillaume

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by