How to get the one by one value of array using variable?

3 Ansichten (letzte 30 Tage)
Aqeel Awan
Aqeel Awan am 1 Jul. 2021
Kommentiert: Aqeel Awan am 2 Jul. 2021
node=[9 44 5];
[m,n]=size(node);
for i=1:m
for j=1:n
%
end
end
i want to get one by one value of array in a variable and then perform some condition on that value, after that next value should be come into variable, how it is possibe?

Akzeptierte Antwort

Yongjian Feng
Yongjian Feng am 1 Jul. 2021
Hello Aqeel,
You want this, right?
node=[9 44 5];
[m,n]=size(node);
for i=1:m
for j=1:n
tmpVar = node(m, n);
end
end
Thanks,
Yongjian

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by