Can we add a statement in between the codes?
5 ビュー (過去 30 日間)
古いコメントを表示
Is it possible to add statements in between the codes. For example: If I have a code like this,
r(:,1) = a(:,1) - a(:,2);
Then can I write it as,
r(:,1) = a(:,1)("this is a constant") - a(:,2)("this is a variable");
0 件のコメント
採用された回答
dpb
2015 年 6 月 15 日
Nyet, no such syntax exists.
About the closest you can get is something like
r = a - ... % this is a constant
b; % this is a variable
BTW: in Matlab the single quote is used for character constants, not the apostrophe.
See the Getting Started section in the doc on the basic syntax
doc punct % will get you to the special punctuation including %
>>
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!