Setting a variable's value as a known constant in a custom equation to be fit to data
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi! I'm trying to fit a set of custom data over and over again following a certain procedure to a custom model. The problem is as follows. In each iteration of this process, I calculate a custom parameter called Kprime. Then, I want to fit the data to the custom model 'exp( (1 + Kprime)*b*x)' where Kprime is a constant in the fit model but a variable in the system. Unfortunately, whenever I run this script, MATLAB keeps thinking Kprime is a constant to be found just like b and asks for two startpoints, upperbounds, lowerbounds, etc. How can I let MATLAB know that Kprime is not a constant to be found but a rather a known constant whose value needs to be looked up from the variable Kprime's current value in the system? Thanks in advance!
0 Commenti
Risposte (1)
Maria-Daphne Mangriotis
il 31 Mar 2021
Modificato: Maria-Daphne Mangriotis
il 31 Mar 2021
Hi there! This is an old post, but I am answering in case others have the same question. I managed to solve this, by using
options = fitoptions(ft)
and setting the options.Upper and options.Lower equal to the constant I wanted for a specific parameter. It seems to work!
0 Commenti
Vedere anche
Categorie
Scopri di più su Get Started with Curve Fitting Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!