integer variable
조회 수: 169 (최근 30일)
이전 댓글 표시
Hi all,
how can I define an integer variable at the begining of program?
thank you in advance;
채택된 답변
Wayne King
2012년 4월 4일
Can you be more specific. You can do something like.
A = int16(zeros(10,1));
but whether that is what you need depends.
댓글 수: 2
Titus Edelhofer
2012년 4월 4일
Hi Wayne,
in newer versions you might write zeros(10, 1, 'int16'): esp. interesting for large arrays, since it doesn't generate a double array first and convert later but creates the int16 array directly.
Titus
Jan
2012년 4월 4일
And in older versions this works efficiently:
clear('A') % On demand only!
A(10, 1) = int16(0);
추가 답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!