whats the syntax of i++ in matlab

23 ビュー (過去 30 日間)
Itzik Ben Shabat
Itzik Ben Shabat 2013 年 8 月 19 日
I have been looking for this and surprisingly couldnt find an answer
is there a shortcut statement that would do what C code "i++" would do? (that is to increase i by 1) ofc ourse i dont mean the obvious i=i+1
thanks

採用された回答

Cedric
Cedric 2013 年 8 月 19 日
編集済み: Cedric 2013 年 8 月 19 日
No, not even i+=1. We see proposals going in that direction in various which-lists, but nothing was implemented so far. What would be also great would be to be able to index the first output argument of functions and to call methods when these are objects. I am wondering though if it is not a deliberate choice to keep "things" more explicit, as no syntax shortcut internally spares memory or brings more efficiency.
  2 件のコメント
Itzik Ben Shabat
Itzik Ben Shabat 2013 年 8 月 19 日
really? this is so surprising. i just had some variables with long names and was lazy with the ctrl+c, ctrl+v. thought im missing somehting. thanks
Cedric
Cedric 2013 年 8 月 19 日
編集済み: Cedric 2013 年 8 月 19 日
It also seems that TMW cares a lot for backward compatibility, because there haven't been a lot of syntax updates which broke it over the past 15-20 years.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHistorical Contests についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by