Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Concatenating strings
Posted:
Jul 28, 2000 2:13 PM
|
|
roster wrote:
> Maybe I haven't looked hard enough through the manual, but here's my > question anyway: > > How do I concatenate a string? Specifically, I want to do something > like: > > Value1 = 5 > String1 = " Value is " + Value1 > > such that String1 is now " Value is 5"
Try:
Value1 = 5 String1=([' Value is ' num2str(Value1)])
This produces one string of length 11.
The secret seems to be in putting the stings into an array. I'm pretty new to Matlab so I don't know the details of how this works, but I've used it without problems.
"help matlab/strfun" lists most of the handy string functions. I've found pretty much all I need in there, and in the manual.
Good luck!
Simon
|
|
|
|