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

1. ## 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.

2. 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.

3. 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.

4. ## 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

5. 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.

6. Wait, are you saying you want to display the string "s1 s2 ... s27"? As in, s1 doesn't stand for another number?

7. 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