About fitting one curve with one equation and calculating two values from fitting

1 visualizzazione (ultimi 30 giorni)
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 Commenti
Sunipa Som
Sunipa Som il 1 Ott 2024
Sorry for my mistake. One curve which is e vs y1 (which is known) and another is e vs y2=(1/((exp(e-u))/kt)) where e varies from 1 to 99. k is known. I have to fit those two and find the value of u and t. How can I do it?
Sam Chak
Sam Chak il 1 Ott 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))

Accedi per commentare.

Risposte (1)

John D'Errico
John D'Errico il 30 Set 2024
Modificato: John D'Errico il 30 Set 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 Commenti
Sunipa Som
Sunipa Som il 1 Ott 2024
Sorry, the equation should be written as y2=(1/((exp(e-u))/kt)). Where e varies from 1 to 99 and from fitting I have to find the value of u and t. The value of k is given. the value of x is e which varies from 1 to 99. Another curve is y1 vs x, where x varies from 1 to 99. I got the values of y1 from simulation for different x.
Therefore one curve which is e vs y1 (which is known) and another is e vs y2=(1/((exp(e-u))/kt)) where e varies from 1 to 99. k is known. I have to fit those two and find the value of u and t. How can I do it?
Image Analyst
Image Analyst il 1 Ott 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.

Accedi per commentare.

Prodotti


Release

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by