MATLAB: How to display elements of Matrix by entering coordinates matrix I want to display elements of a matrix by entering coordinates in the command window Example: 1 0 00 1 00 0 1 if I enter disp(x(2,2)); I want to get 1 Best Answer You have to assign the matrix to ‘x’ first:x = [1 0 0 0 1 0 0 0 1];disp(x(2,2)) 1 Related SolutionsMATLAB: How to select the best matrix from a set of matrices and label it as ‘TEC’ ResultEB(1,1,1) = 59 ;ResultEB(1,1,2) = 64 ;ResultEB(1,1,3) = 59 ;ResultEB(1,1,4) = 59 ;ResultEB(1,1,1) = 62 ;[val,idx] = max(ResultEB) ;TEC = ResultEB(:,:,idx) ; MATLAB: Coordinates elements and distance temp = find(val>0);cord_new = coordinate(:,temp+1);distx = (((cord_new(1,:) - coordinate(1,1)).^2) + ((cord_new(2,:) - coordinate(2,1)).^2)).^0.5; Related QuestionCreating a Matrix including ones on diagonalIs there a way to assign a value to multiple diagonals in a matrixInput function to enter array elementsHow to get specific eigenvectorsEntering a formula by user
Best Answer