About fitting one curve with one equation and calculating two values from fitting
1 view (last 30 days)
Show older comments
I want to fit one curve (x vs y1) with equation y2=(1/ (exp(e-u))/kt)) with same x axis and want to find the value of e and u. How can I do it?
6 Comments
Sam Chak
on 1 Oct 2024
Please click this paperclip icon to attach the data for plotting.
If your inline math equation and the implied multiplication are interpreted according to the standard order of operations, it represents a decaying exponential function. This function can be either strictly monotonically decreasing or strictly monotonically increasing, depending on the parameters k and t.
Double check in MATLAB:
syms x u k t
expr = (1/((exp(x - u))/k*t))
Answers (1)
John D'Errico
on 30 Sep 2024
Edited: John D'Errico
on 30 Sep 2024
Suppose I gave you a set of data, and asked you to tell me two parameters from the data. All I need is one data point, More would just confuse things.
x = 12
Now, I will suggest a "model" for x, in the form of x = a + b. What are a and b?
Can you tell me what a and b are, separately? You know the sum of a and b, perfectly. But you can never know what a is versus b. The two numbers could be any set of two that sum to 12. So [0,12], [6,6], [12,0], [-5347,5359], etc.
You can NEVER recover both a and b separately in that model, any more than you can recover both e and u in your model, no matter how much data you have. There is no mathematical magic available, no tricks, no statistical resources, no functions in MATLAB to do what you have asked.
Had I told you the value of a, then you can infer b. Similarly, in your problem, if one of the unknowns is known, then you can infer the other. But that is the best you can ever do.
I'm sorry, but there are some things you can never learn, and it is easy to write down a problem with no solution. You did so in your question.
2 Comments
Image Analyst
on 1 Oct 2024
I've read it 4 times and it's clear as mud. So you're plotting e vs y1 and e vs. y2? So e is your dependent variable on the y axis and y1 and y2 are the independent variable on the x/horizontal axis? Or did you mean to say you want to plot y1 vs e?
About all I can suggest is that if you have some experimental data you can try to use fitnlm to estimate some parameters for a model. I'm attaching some demos for various models. Adapt as needed, if possible.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
Some screenshots of your data plotted and desired/expected fit curve would also be good to help us understand this.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!