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

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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Entering 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