MathMath

Help › Functions

Strings

num2str concat strlen

num2str(x) As in Mathcad

The number x written as a string.

Gives as many digits as needed, not the displayed ones. Join strings with concat.

Units

Only the number is used; units are dropped.

Refused

  • A complex number.
num2str(2.5)=”2.5”
concat(”R = ”,num2str(47))=”R = 47”

concat(s1, s2, …) As in Mathcad

The strings joined into one.

Takes any number of strings. An argument that isn't a string counts as empty. Use num2str to put a number in.

concat(”ab”,”cd”)=”abcd”
concat(”x”,”y”,”z”)=”xyz”

strlen(s) As in Mathcad

The number of characters in the string s.

Anything that isn't a string gives 0.

strlen(”hello”)=5
strlen(””)=0