フィルターのクリア

Setting a variable's value as a known constant in a custom equation to be fit to data

2 ビュー (過去 30 日間)
Devansh
Devansh 2015 年 2 月 15 日
編集済み: Maria-Daphne Mangriotis 2021 年 3 月 31 日
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!

回答 (1 件)

Maria-Daphne Mangriotis
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!

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by