From: Jean-Philip Dumont on
dpb <none(a)non.net> wrote in message <hv0d12$d7g$1(a)news.eternal-september.org>...
> Jean-Philip Dumont wrote:
> > Walter Roberson <roberson(a)hushmail.com> wrote in message
> > <f2OQn.37431$rU6.15222(a)newsfe10.iad>...
> >> Jean-Philip Dumont wrote:
> >>
> >>
> >> > Titres2(1+((i+j)-1)+((2*i)-2),:) = {Titres{i}, '_t-', j};
> >>
> >> Titres2(1+((i+j)-1)+((2*i)-2),:) = {[Titres{i} '_t-' sprintf('%d',j)]};
> >
> >
> > Wow! Thank you so much it works perfectly!
>
>
> How about
>
> Titres2(3*i+j-2,:) = {[Titres{i} '_t-' sprintf('%d',j)]};
>
> ??
>
> :)
>

You are right, its a simple simplification that is nicer to look at!

Thank you again for your help!
From: Steven Lord on

"Jean-Philip Dumont" <jean-philip.dumont(a)hec.ca> wrote in message
news:hv09bi$h4q$1(a)fred.mathworks.com...
> Hi,
>
> I'm trying to create a loop that will generate ma variable names
> automatically.

If I understand what you're trying to do (use variables const_t_1,
const_t_2, const_t_3, etc.) correctly, DON'T DO IT. Use the alternatives
listed in the answer to Q4.6 in the newsgroup FAQ instead.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com