Apply boundary condition (upper and lower limit) to parameters during the fitting using the function nlinfit?
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Does anyone knows how to apply boundary condition to the parameters during the fitting using the function nlinfit?
I know that this could be done using the function fit, but i need to use the function nlinfit. (in that regards see the post in the link attached)
Thank you very much in advance for the help.
0 Kommentare
Antworten (2)
Parag
am 14 Mai 2025
Bearbeitet: Parag
am 14 Mai 2025
The ‘nlinfit’ in MATLAB does not support parameter bounds directly . However, if you are required to use ‘nlinfit’, you can use this workaround to enforce parameter bounds:
Transform the parameters so that they always stay within bounds, even though ‘nlinfit’ optimizes over unbounded parameters.
Example: Suppose you want to constrain F(1) between 0 and 1. You can optimize over a new parameter theta, and define:
F(1) = 1 ./ (1 + exp(-theta)); % logistic transformation: bounded between 0 and 1 as exponent cannot be negative
so denominator will always be greater than 1 and in limiting case theta approaching to negative infinity this expression will approach to zero.
Hope it helps!
0 Kommentare
Torsten
am 14 Mai 2025
Bearbeitet: Torsten
am 14 Mai 2025
If you restrict parameters by imposing upper and/or lower bounds, a statistical analysis of the results like that offered by "nlinfit" is no longer possible. That's why you cannot set upper and lower bounds when you use this tool.
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!