MATLAB: How can i assign a full row into a new row neural network suppose T = [1 2 3 4; 3 4 5 6] and i want to assign the 1st row with all the column into a new row like P and this can be as follows P= 1 2 3 4 Q= 3 4 5 6 Best Answer P = T(1, :)Q = T(2, :)Or you could just not bother and use T(1, :) wherever you want P and T(2, :) wherever you want Q.Note that the colon means all elements (of the row in this instance). Related SolutionsMATLAB: Put smaller matrix in bigger matrix eg:Q = randi(456,10,15);row=[1 2 5 4 3 6];column=[5 7 3 4 8 14];P = Q(sub2ind(size(Q),row,column));EDITp = Q(row,column);P = zeros(size(Q));P(1:numel(row),1:numel(column)) = p; MATLAB: Rows a = rand(1000,5);b = min(a,[],2); Related QuestionSubtract row from previous rowSum up row valuesGathering values while running fminconSorting rowsGathering values while running fminconFinding Duplicate rows
Best Answer