I want to safe a vector in one single matrix spot
Ältere Kommentare anzeigen
Hello,
I am running some loops, and every loop I want to safe the data in a matrix. But every loop I have to safe a vector, so I'd like to put that vector on 1 spot in the matrix. for example: I'd like to put the vector (1, 2, 3, 4, 5) in matrix point matrix(1,4). Can anybody help me?
Nick De Vocht engineering student @ KULeuven
Antworten (1)
Wayne King
am 2 Dez. 2013
Bearbeitet: Wayne King
am 2 Dez. 2013
You cannot put a vector in the location of a single element in a matrix. You can create a cell array and put a vector in an element of the cell array.
X = cell(2,2);
X{1,1} = 1:5;
X{1,2} = 1:2:10; % same as X{3}
1 Kommentar
Nick
am 2 Dez. 2013
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!