integer variable
176 ビュー (過去 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!