cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

## Maximum Value of a Piecewise Function  6-Contributor

## Maximum Value of a Piecewise Function

Hello,

I am working on a simply supported beam calculator. I have everything up and working but I am having trouble when it comes to determining the maximum of the displacement and it's corresponding x value.

In the collapsible area under the loads you can see I have the various displacement equations and to find the total displacement I sum them up. I then need to find where this value is a maximum but I don't know how to do it other than reading it off the graph.

Is there a more elegant way to determine the maximum so I can define a function for maximum displacement and corresponding x-location. I have attached the sheet for reference.

Thanks,

Callum

1 ACCEPTED SOLUTION

Accepted Solutions  21-Topaz I
(To:Callum1995)

Hi Callum,

There is a difference between a range variable and a vector. defines a range variable.  It does not create a vector.

I like to define a vector "x" and a matching indexed range variable "ix"

This following code creates a vector "xp" and a matching range variable "ix" The subtle change is that you can create a vector of deflections at points on the beam and find a maximum of that vector The solution comes  with a drawback in that you need to use the index variable "ix" in the plots   Cheers

Terry

2 REPLIES 2  21-Topaz I
(To:Callum1995)

Hi Callum,

There is a difference between a range variable and a vector. defines a range variable.  It does not create a vector.

I like to define a vector "x" and a matching indexed range variable "ix"

This following code creates a vector "xp" and a matching range variable "ix" The subtle change is that you can create a vector of deflections at points on the beam and find a maximum of that vector The solution comes  with a drawback in that you need to use the index variable "ix" in the plots   Cheers

Terry  6-Contributor
(To:terryhendicott)

Hi terry,

Thanks for you response! I have got it up and working now.

Best Regards,

Callum Announcements