> I have a matrix size 1200x750; > If I wanted to find the maximum values on all 1200 files I can use the > one suggested by Steven. I used that to find the maximum values and I > still have questions about the idea mentioned just above by dpd. I want > to find for all 1200 files the 0.005* of the maximum and 0.8*of the > maximum. > file=1200x750; > x=file(1,:); % the first file > xmax=max(x); > b=find(x>=0.8*xmax); > b1=b(1); > c=find(x>=0.005*xmax); > c1=c(1); > and I want to save these c(1) and b(1) values. This perfectly works if I > work for each file individually but I want to find for all files (1200). > Any ideas would be appreciated.
First some clarification and questions so are on the same page...
It's somewhat confusing to refer to an array as a file--generally one thinks of a file as an externally-stored disk file and when speaking of them in the plural as a multitude of same.
Is it so that you're really speaking of an array (matrix) in memory as the above indicates in code? That is, is this actual code that returns what you want or is it some pseudo-code trying to express what you would like to get from a sequence of files?
Secondly, presuming it really is an array and you're looking for these values by column inside the array, the above returns the first (and only the first) of what may be multiple values that meet the criteria. Is that what is wanted or do you need all values?