I have a matrix which size is mx1, I wanna give number for each value in a row starting 1 and ends m.

1 view (last 30 days)
for example;
a=[0.1;0.2;0.3;0.4;0.5]
value_1=0.1 value_2=0.2 value_3=0.3 .....value_m=0.5
how can i create "value" variable with giving the numbers related the order of columns?

Accepted Answer

Image Analyst
Image Analyst on 18 May 2013

More Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 18 May 2013
Do you mean
k=5
assignin('base',sprintf('value_%d',k),k*0.1)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!