Setting a variable's value as a known constant in a custom equation to be fit to data
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Maria-Daphne Mangriotis
le 31 Mar 2021
Modifié(e) : Maria-Daphne Mangriotis
le 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 commentaires
Voir également
Catégories
En savoir plus sur Whos dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!