Azzera filtri
Azzera filtri

Force get 3*4 matrix

1 visualizzazione (ultimi 30 giorni)
Dani D
Dani D il 17 Feb 2017
Modificato: James Tursa il 17 Feb 2017
Hello, I want force user input exactly 3*4 matrix. other size is unacceptable.

Risposta accettata

James Tursa
James Tursa il 17 Feb 2017
x = the user input
if( ~isequal(size(x),[3 4]) )
error('Size must be exactly 3x4')
end
  2 Commenti
Guillaume
Guillaume il 17 Feb 2017
Modificato: James Tursa il 17 Feb 2017
or
validateattributes(x, {'numeric'}, {'size', [3 4]})
James Tursa
James Tursa il 17 Feb 2017
+1 Guillaume

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by