how can i do this? ex.
desired output: i=[1 2 3] or i=123
" x=input('input value of x: ') %then the user will enter x=[1:5]
desired output: y=[2 4 6 8 10] or y=246810
A=rem(N,2) N=floor(N/2) end
and my desired output is A=11000 or A=[1 1 0 0 0]
how could i do this?
No products are associated with this question.
If you're going to allow the user to enter brackets and colons, then you're going to have to accept it as a string and either call eval(), or parse the string to extract out the individual numbers.