how to continue matlab strings?

Started by cxv dfg February 19, 2002
Hi,
How do you continue 'Strings' on new line? The normal
matlab statements are continued on new line by putting
three dots (...). But this doesn't work for 'strings'.

can anybody give the solution???

thanks in advance,

Vivek



>>>>> "cxv" == cxv dfg <> writes:

cxv> Hi,
cxv> How do you continue 'Strings' on new line? The normal
cxv> matlab statements are continued on new line by putting
cxv> three dots (...). But this doesn't work for 'strings'.

cxv> can anybody give the solution???

Break the string into array of strings. For example,

disp(['blah blah dsjfdj ldsjfdshfd fdshfds blah', ...
'continue the rest of blah blah blah']);

HTH
gana --


Hi Vivek,

You'll need to break up the string into segments and
then combine the segments together using the function
STRVCAT.

Try this:

>> a='This';
>> b='is';
>> c='a';
>> d='string.';
>> e=strvcat(a,b,c,d)
e =
This
is
a
string.
>>

-Mark

--- cxv dfg <> wrote:
> Hi,
> How do you continue 'Strings' on new line? The
> normal
> matlab statements are continued on new line by
> putting
> three dots (...). But this doesn't work for
> 'strings'.
>
> can anybody give the solution???
>
> thanks in advance,
>
> Vivek


__________________________________________________


Hi Vivek,

You'll need to break up the string into segments and
then combine the segments together using the function
STRVCAT.

Try this:

>> a='This';
>> b='is';
>> c='a';
>> d='string.';
>> e=strvcat(a,b,c,d)
e =
This
is
a
string.
>>

-Mark

--- cxv dfg <> wrote:
> Hi,
> How do you continue 'Strings' on new line? The
> normal
> matlab statements are continued on new line by
> putting
> three dots (...). But this doesn't work for
> 'strings'.
>
> can anybody give the solution???
>
> thanks in advance,
>
> Vivek


__________________________________________________


>>>>> "cxv" == cxv dfg <> writes:

cxv> Hi,
cxv> How do you continue 'Strings' on new line? The normal
cxv> matlab statements are continued on new line by putting
cxv> three dots (...). But this doesn't work for 'strings'.

cxv> can anybody give the solution???

Break the string into array of strings. For example,

disp(['blah blah dsjfdj ldsjfdshfd fdshfds blah', ...
'continue the rest of blah blah blah']);

HTH
gana --


Hi,
How do you continue 'Strings' on new line? The normal
matlab statements are continued on new line by putting
three dots (...). But this doesn't work for 'strings'.

can anybody give the solution???

thanks in advance,

Vivek