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?

Antworten (1)

Walter Roberson
Walter Roberson am 9 Jan. 2018

0 Stimmen

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 Kommentare

It's in the standard documentation for plus: doc plus scan down to the section headed "Concatenate Strings"
The discussion to which Walter refers is here.
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Entering Commands finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Noch keine Tags eingegeben.

Gefragt:

am 9 Jan. 2018

Kommentiert:

am 9 Jan. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by