Apr 20, 2003 #1 tendai1 Structural Mar 29, 2003 24 0 0 GB Given a variable defined as (setq a '(-10 -20 10 20)) Can you help me to find the Max or Min of a (i.e. using the variable a). I would appreaciate anything other than (max -10 -20 10 20).
Given a variable defined as (setq a '(-10 -20 10 20)) Can you help me to find the Max or Min of a (i.e. using the variable a). I would appreaciate anything other than (max -10 -20 10 20).
Apr 20, 2003 1 #2 Estassoc Mechanical Jul 20, 2002 75 0 0 US (apply 'max a) where is set to your list '(-10 -20 10 20). Cheers. Upvote 0 Downvote
Apr 20, 2003 #3 Estassoc Mechanical Jul 20, 2002 75 0 0 US This should be the post...... (apply 'max a) where 'a' is set to your list '(-10 -20 10 20). Cheers..... Upvote 0 Downvote
This should be the post...... (apply 'max a) where 'a' is set to your list '(-10 -20 10 20). Cheers.....
Apr 21, 2003 Thread starter #4 tendai1 Structural Mar 29, 2003 24 0 0 GB Thanks it worked well, is there a command which can sort numbers i.e. (min - - - - - max) just like we can sort letters alphabetically. Upvote 0 Downvote
Thanks it worked well, is there a command which can sort numbers i.e. (min - - - - - max) just like we can sort letters alphabetically.
Apr 21, 2003 #5 Estassoc Mechanical Jul 20, 2002 75 0 0 US For sorting numbers in Acad2000 and above, you can use the following: (vl-sort x '<) where 'x' is the list of numbers you want sorted from min to max. Upvote 0 Downvote
For sorting numbers in Acad2000 and above, you can use the following: (vl-sort x '<) where 'x' is the list of numbers you want sorted from min to max.