+2

Software function: Second Highest Number ( and 3rd, 4th, 5th ...)

Andy Pauly 4 years ago in IQANdesign updated by Patrick Warden 4 years ago 1

Hello 

I have a situation where a external system creates about 4000 error numbers. I have to find the active error by looking into 4000 error messages. To find the first active error is easy by using the MAXof function. But to find the 2nd, 3rd, 4th, 5th, 6th is extremely hard. The ARRAY is now 40% of the application file because there is no 2nd highest number (.. and 3rd, 4th, 5th...) function available in IQAN. Is there any chance to get this function implemented into IQANdesign??

Thanks


Andy Pauly

Without an array sorting function or any simple mechanism to iterate over an array, it seems like you get forced into some pretty ugly ways to implement a solution to this problem. It seems like you would have to use MAXof, find the index of that value, store that value somewhere to do something useful with it, set the value at that index in the array to 0, then run MAXof again to get the next one, etc... or something involving an SMC with 4000 states...