the problem I'm working on is to find the saddle points of a matrix and now I'm trying this …
- nested loop to check every element
- check if the element is the smallest in its column and the biggest in its row
- if it is,print it into the matrix'indices'
- if there was none,print empty matrix….and the code [row,col]=size(matrix); for I=1:row for j=1:col if matrix (I,j)==max(matrix, I)&&matrix (I,j)==min(matrix, j) indices=[i j;]: else indices=[ ] end end endsome help with the syntax please,thanks!!
Best Answer