I'm a Ph.D. student working on nonlinear optics. I use Matlab to process experimental data and, the more complicated thing is, perform numerical simulation of light propagation based on partial differential equations.
Hi everyone~ I read the code again and found what was wrong... I should put in the argument [.08 .08 .5 .5]. When I changed in the function supAxes=[.08 .08 .5 .5] (line 46), it was overwritten (line 49-57). Thanks...
I am converting an image into a matrix using imread. Then I am taking the R component. After that I am sorting the matrix elements using your program. Here the problem is that for the rows and columns greater than the value 255, the indices are not getting the value i.e. there's no indices such as (300,400) for a value. likewise no index like this one:(400,500) etc.
But if I take ones(512,512). The indices are shown for more than 255.
Please give a solution to this problem.
I know it's simple and all, but shouldn't matlab be providing a straight function for something as basic as this? anyway thanks, Matt.
I spent an hour trying to do this very thing, 'cos i didn't know about ind2sub() and then on a hunch, checked here!
matlab sort is much faster! ,
one may consider improving the original matlab sort by adding an additional parameter (say k) for ordering at most the first kth largest elements and the first k corresponfing indices