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

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?

Weitere Antworten (1)

Do you mean
k=5
assignin('base',sprintf('value_%d',k),k*0.1)

Kategorien

Mehr zu Display Image finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by