How can I determine (optimize) 4 constants or parameters for an equation with 4 variables in Matlab
Show older comments
Hello everyone, I have got an equation with 4 variables and 4 constants as shown below: Z=c * V^-m * P^n * S^x where Z, V, P and S are variables (known data) and c, m, n and x are constants (unknown). I want to find the 4 constants. Could you please help me for this issue?
Answers (1)
Alan Weiss
on 3 Dec 2015
0 votes
If you have no constraints (limits on your variables), use fminsearch. For an example of its use, see the documentation.
If there are constraints (such as some variables must be positive) and you have an Optimization Toolbox license, use fmincon.
Alan Weiss
MATLAB mathematical toolbox documentation
3 Comments
Ahmed Hasan
on 3 Dec 2015
Edited: Walter Roberson
on 3 Dec 2015
Walter Roberson
on 3 Dec 2015
??
You have V, P, S, M in your matrix, but you said that m is a constant to be found. You do not have Z in your matrix but you said Z was known. Your function uses c without defining it.
Categories
Find more on Choose a Solver in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!