Quantcast
Channel: Cadence Technology Forums
Viewing all articles
Browse latest Browse all 63306

Forum Post: RE: Is there any SKILL command to find the MIN and MAX value in a list/array (containing numbers) ?

$
0
0
I could probably come up with a complicated macro or function to generalise this, but don't have time right now. So assuming it's a simple two-dimensional array, something like: procedure(CCFfindMinMaxForRow(array func row) let((current) current=array[row][0] for(ind 1 length(array[row])-1 current=funcall(func current array[row][ind]) ) current ) ) procedure(CCFfindMinMaxForCol(array func col) let((current) current=array[0][col] for(ind 1 length(array)-1 current=funcall(func current array[ind][col]) ) current ) ) Then use CCFfindMinMaxForRow(A 'min 0) or CCFfindMinMaxForCol(A 'max 0) for example. You can even use the same functions to add up all the entries in a column or row by passing 'plus instead of 'min or 'max Andrew.

Viewing all articles
Browse latest Browse all 63306

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>