Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Max out of a function, Mx(x) 1

Status
Not open for further replies.

Qshake

Structural
Jul 12, 2000
2,672
I would like to know how to find the max of a function defined as Mx(x) by programming.

The max(A) function doesn't work in this case....

Thanks,


Regards,
Qshake
[pipe]
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 
Replies continue below

Recommended for you

But, what's the basic approach? Is your program going to iterate on x to find the exact maximum?

Or, are you simply going to throw a vector of x's at the function and pick the one that has the highest value?

Or, would you use Maximize? which is like given-find, you define guess values, which you should pick from a plot of the function, use maximize(f,x)

TTFN

FAQ731-376
 
IRstuff -

I have assigned the function Mx over the range of x from 0 to L a series of piecewise equations.

I have plotted the function Mx(x) and can find graphically the max value as well as simply printing out the contents of the Mx(x) and cursor through them.

But I would like to have another variable, say MaxM that reports the maximum value in Mx(x) automatically without any user input.

I hope that helps.

Regards,
Qshake
[pipe]
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 
jghrist - Thanks!! Worked like a charm.

Regards,
Qshake
[pipe]
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor