# how to create a sequence s1 s2 s3 ..s11 s12....

• Jun 4th 2010, 09:49 AM
ganesh
how to create a sequence s1 s2 s3 ..s11 s12....
sir,can u tell me how to generate the sequence s1 s2 s3 s4.. s11 s12 ...
upto required integer value programitically in MATLAB.
• Jun 4th 2010, 10:13 AM
undefined
Quote:

Originally Posted by ganesh
sir,can u tell me how to generate the sequence s1 s2 s3 s4.. s11 s12 ...
upto required integer value programitically

There is not enough information.
• Jun 4th 2010, 10:08 PM
ganesh
sir,
can u tell me how to generate the sequence s1 s2 s3 s4.. s11 s12 ...
upto required integer value programatically in MATLAB.[/quote]

explaining more.
suppose i have value of n= 27;
i want to generate the sequence & display it as s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 13....upto ...s27.this should be done programitically.
• Jun 4th 2010, 10:14 PM
ganesh
how to generate array s1 s2 s3 s4....sn
sir,
i want to generate an array s1 s2 s3...upto sn programatically.
n may be =25.

where 's' is a character
• Jun 4th 2010, 10:16 PM
undefined
Quote:

Originally Posted by ganesh
explaining more.
suppose i have value of n= 27;
i want to generate the sequence & display it as s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 13....upto ...s27.this should be done programitically.

Generating this sequence will be more difficult than generating the sequence 1, 2, 3, 4, ...

It depends on the sequence.
• Jun 4th 2010, 11:28 PM
undefined
Wait, are you saying you want to display the string "s1 s2 ... s27"? As in, s1 doesn't stand for another number?
• Jun 4th 2010, 11:31 PM
CaptainBlack
Quote:

Originally Posted by ganesh
sir,can u tell me how to generate the sequence s1 s2 s3 s4.. s11 s12 ...
upto required integer value programitically in MATLAB.

Can you be more precise, do you mean how do you generate all the variables named s1, s2, ... sn without having to know n in advance?

But try something based on:

Code:

```>nn=124 >eval(['s',num2str(nn),'=0'])```
CB