Force get 3*4 matrix
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello, I want force user input exactly 3*4 matrix. other size is unacceptable.
댓글 수: 0
채택된 답변
James Tursa
2017년 2월 17일
x = the user input
if( ~isequal(size(x),[3 4]) )
error('Size must be exactly 3x4')
end
댓글 수: 2
Guillaume
2017년 2월 17일
편집: James Tursa
2017년 2월 17일
or
validateattributes(x, {'numeric'}, {'size', [3 4]})
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!