About fitting one curve with one equation and calculating two values from fitting
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Sam Chak
el 1 de Oct. de 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))
Respuestas (1)
John D'Errico
el 30 de Sept. de 2024
Editada: John D'Errico
el 30 de Sept. de 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 comentarios
Image Analyst
el 1 de Oct. de 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.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!