comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to spot maximum x value AND corresponding y value?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to spot maximum x value AND corresponding y value? [message #69848 is a reply to message #69826] Tue, 16 February 2010 07:26 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Feb 16, 10:23 am, "M." <markus_men...@yahoo.de> wrote:
> I have an input file (ascii) containing coordinate data (three
> columns; x, y, z).
> I want to compute a vector from one point to another. I know the
> vector should go from the maximum x value to the minimum y value (or
> vice versa). I took the FLOAT function to find out the min and max
> values. But how can I find out the corresponding x and y values for my
> y_min and x_max values?

Your question is not very clear, but I am guessing that what you want
is to find out which points have the maximum/minimum x and y values.
Which would be something like:

x_max_val=max(x,x_max_ind,min=x_min_val,subscript_min=x_min_ ind)
y_max_val=max(y,y_max_ind,min=y_min_val,subscript_min=y_min_ ind)

Which would give you the maximum value of x in x_max_val and the index
where that occurs in x_max_ind. That is,
x_max_val==x[x_max_ind]==max(x).
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Open URL in external browser
Next Topic: Re: Coyote Cojones

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 14:59:44 PDT 2025

Total time taken to generate the page: 2.15580 seconds