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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

graph curve manipulation

gcurl
10-Marble

graph curve manipulation

Hi All,

I am trying to get a skewed bell curve to represent a chemical in a reaction via an equation. This first bell curve will be subtracted from another skewed bell curve that represents a second chemical in the reaction. I have tried many equation types and have settled on the one that I am currently using. The trouble is that I cannot manipulate the equation variables enough to attain the configuration that is needed.

Would you all inspect my equation and advise me on whether it can be edited to fit the Benchmark dots on the graph. Maybe another variable can be inserted into the equation? If, not, can you recommend a new equation? The curve slopes are not as critically important as the start, finish, and peak positions and values.

As of now, the starting(blue) and finishing(cyan) points are good. It is the peak(green) that must move to the right without sacrificing the other positions.

All help is very appreciated.

Thank you,

Gary

Mathcad 11

66 REPLIES 66

Werner;

You are correct--what I posted is the same as you had previously.  Why these don't fit Gary's requirements is, I believe, due to shifting requirements.

Luc already suggested the two sines her Re: graph curve manipulation

Gary was unsure about how to implement it in PHP. Luc explained about the bbolean expressions he used and showed how to do it using the if function, but Gary did not catch on. So I guess theres something about that solution which Gary did not like at the end.

Later he added more benchmarks but I also got the impression that the shape of the curve does not matter that much other than at the three main "benches".

Heres a polynomial of sixth order also with slope zero at the three "benchmarks" and should be easy to implement in PHP, too. But maybe its not "asymptotic" enough at zero, don't know.

File in MC11 format attached.

gcurl
10-Marble
(To:Werner_E)

Hi Fred, Werner, Luc, and All,

I have been working hard at your suggestions.

Fred, your equation works about 95% on the front end but not on the back end. I can easily accept the front end but I had difficulty trying to maneuver the second equation to fit the back end. I have not employed "shifting requirements" as I posted the image of the graph that I need early on. The benchmarks come directly from it. Yes, I did post more benchmarks but they came from the image that has been here from either the start or nearly the start. I only posted them to help you guys and, frankly, to clarify the graph for me and everyone else.

Werner, your file, simple fit.mcd, seems to me to be essentially the same as Fred's file. I have not had a chance to explore your "polynomial of sixth order" yet but I will probably have a tough time with it. I will explore it later tonight. I will have to research what "sixth order" means first. Ha ha.

Luc, your original iteration of these latest two files was, in my opinion, a great try. I wish that there was a way to employ more benchmarks in that method.

As always, I fully appreciate your input and help.

Gary

Werner_E
25-Diamond I
(To:gcurl)

> Werner, your file, simple fit.mcd, seems to me to be essentially the same as Fred's file.

It IS Freds file! I didn't even bother renaming it 😉

I simply added the sixth order polynomial and plotted it together with Freds approach at the end of the file.

Sixth order refers to the highest exponent, so we are talking about a function of the type

y = a6*x^6 + a5*x^5 +a4*x^4 + a3*x^3 + a2*x^2

There is no summand x^1 or x^0 because the function runs through 0/0 and is horizontal there.

The five coefficients a2 to a6 you can see in the picture or in the file as exact  fractions and also as approximated decimals.

Fred_Kohlhepp
23-Emerald I
(To:gcurl)

Someone smarter than I might find a better function to fit the right-hand-side of your curve.  (I've tried--believe me.)  At this point I can see three paths:

  • fit a smooth curve thru three bench marks (Luc's sine fit, for example.)
  • put in all the data points you have and find the best fit you can,
  • Search the literature to find out what the form of this function should be.

How you proceed depends on what your final goal is;  aside from a subtraction from another curve, that remains a mystery!

Fred_Kohlhepp
23-Emerald I
(To:gcurl)

Gary Curl wrote:

Hi Luc,

Ok, I provided 2 more benchmark points. I always stated that I didn't really care how the two slopes went as long as they were smooth. I still don't have an exact match for the slopes. All I ever really needed were the start, the peak, and the end; 3 benchmark points.

The more points you provide, the easier it becomes to deduce the correct form of your function.  In order to get a "manufactured" curve that you can use, you need the right manufactured curve.  Give these boys all the points you have.

gcurl
10-Marble
(To:gcurl)

Hi All,

I have been working very hard on finalizing this issue. I had posted a file earlier(weeks ago) that at that time was going to be the one. Since then I have taken a closer look at a file that Luc posted that back then wasn't close enough to what I needed. I have made his method work great for me. I found that I also needed the variability that his methodology affords. I can easily move the nodes around by changing the node's x,y values.

I might also insert a 'node' at the lower left of the curve which would allow me to vary the upward onset; similar to what I did at the end of the curve with the downward finish.

I appreciate everyone's contributions as they all allowed me to open my thought process.

After the Mods approve this post, I will mark it as "answered".

Thank you All,

Gary

Announcements

Top Tags