I want to select one column of an array at a time every time a for loop starts

1 Ansicht (letzte 30 Tage)
A=[1 2 3, 4 5 6, 7 8 9,......,n]
so i want the first loop to work with the first column of A to do an operation, then the second loop the same operation but with the second column of A and so on

Akzeptierte Antwort

KSSV
KSSV am 20 Mär. 2019
A = rand(3) ;
for i = 1:3
A(:,i)
end

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help 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