Setting a variable's value as a known constant in a custom equation to be fit to data
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Maria-Daphne Mangriotis
2021-3-31
编辑:Maria-Daphne Mangriotis
2021-3-31
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!