Concatenation by Java-style + operator in Matlab

I cannot seem to find documentation anywhere of this feature to concatenate strings and variables in Matlab using the Java-style + operator:
>> v = 10;
>> s = v + " m/s"
>> disp(s)
10 m/s
Is this supported or experimental?

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 1 月 9 日

0 投票

It is supported, but it is badly indexed. Unfortunately at the moment I cannot find the recent discussion I had with Mathworks about this.

3 件のコメント

Philip Borghesani
Philip Borghesani 2018 年 1 月 9 日
It's in the standard documentation for plus: doc plus scan down to the section headed "Concatenate Strings"
Steven Lord
Steven Lord 2018 年 1 月 9 日
The discussion to which Walter refers is here.
Walter Roberson
Walter Roberson 2018 年 1 月 9 日
Thanks, Steven, that was the post. I also wrote a documentation enhancement request but I can't seem to find that in my email at the moment.

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

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

製品

タグ

タグが未入力です。

質問済み:

2018 年 1 月 9 日

コメント済み:

2018 年 1 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by