Spaces in strings in matlab/octave

To get spaces in the strings to work in matlab or octave, use

t1={‘test test’}

Result is
t1 =
{
[1,1] = test test
}

t2=strcat({‘test test ‘},{‘blah blah’})

Result is
t2 =
{
[1,1] = test test blah blah
}

you can use this string in your figures by
plot([1:4])
title(t2{})

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>