MATLAB: Select elements of Matrix matlab matrix element Hi, I have a 20×20 matrix, P. I wish to define a matrix Q such that the rows of Q are the LAST 18 rows of P (rows 2-20), and the columns of Q are the last 18 columns of P (columns 2-20). Best Answer It's basic matrix indexing:Q = P(2:20, 2:20) Related SolutionsMATLAB: How to find row/column indices having all values NaN If x is your matrix, do you meanfind(all(isnan(x),2))orfind(all(isnan(x),1))HTH MATLAB: 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; Related QuestionRepeat last row at the end of matrixHow to write Continue Long Statements on Multiple LinesRandom matrix with maximum values.I am solving a system of non linear equation using vpasolve but it shows answer as [0*1sym] any other method that I can use
Best Answer