Filter löschen
Filter löschen

how to assign our output in an empty matrix

1 Ansicht (letzte 30 Tage)
Rutika Titre
Rutika Titre am 2 Dez. 2015
Beantwortet: Walter Roberson am 2 Dez. 2015
M working on a matrix of size 5X8 lets say its iimat. On this matrix I am applying one algorithm on each row of matrix iimat and get the ouput in rrow .I have defined mmat=[] as an empty matrix and here I have to assign each rows output in mmat. How to assign each rrow which is output of each iimat row to mmat.At the end mmat size will be 5X8 same as that of iimat

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 2 Dez. 2015
for K = 1 : size(iimat,1)
one_row = iimat(K,:);
processed_row = sin(one_row); %for example
mmat(K,:) = processed_row;
end

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays 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