Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find corresponding X value for maximum Y

Status
Not open for further replies.

DDP

Structural
Apr 23, 2002
38
If I have

x:=1,2..4

y:=x+1

x=1,2,3,4
y=2,3,4,5

I can do max(y), but how do I get it to return what x causes the max?

I cannot do differentiation because I have a more complex equation with absolute value and thus is discontinuous.

Thanks
 
Replies continue below

Recommended for you

If x and y are both vectors you can use:

lookup(max(y),y,x)

Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor