Force get 3*4 matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Dani D
am 17 Feb. 2017
Bearbeitet: James Tursa
am 17 Feb. 2017
Hello, I want force user input exactly 3*4 matrix. other size is unacceptable.
0 Kommentare
Akzeptierte Antwort
James Tursa
am 17 Feb. 2017
x = the user input
if( ~isequal(size(x),[3 4]) )
error('Size must be exactly 3x4')
end
2 Kommentare
Guillaume
am 17 Feb. 2017
Bearbeitet: James Tursa
am 17 Feb. 2017
or
validateattributes(x, {'numeric'}, {'size', [3 4]})
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!