Dear Matlab community,
I am trying to implement the minimum search within a matlab function block in a simulink model.
I need to find the minimum element and hence its coordinates of a matrix so I used the following code where the matrix "a" may contain 'nans'
however, I get the error " Invalid option. Option must be 'omitnan' or 'includenan' ". I substituted 'omitnan' to 'all' option but I eneded up with a "size mismatch" error.
So I am now using a for loop to search the minimum in the matrix, but this slows down my code.
I saw that this issue could arise with matlab releases that are older than 2018b, but I am using 2018b.
Do you know if there are other ways to solve this problem? Am I doing something wrong?
thank you in advance