Can I set the initial value of the solution in "solve" function? Like "fsolve" function?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
qingwei wang
am 12 Jul. 2020
Kommentiert: Star Strider
am 13 Jul. 2020
Can I set the initial value of the solution in "solve" function? Like "fsolve" function?
My code is:
syms p z
b=150;beta=10;s=10;s0=5;alpha=0.5;c1=30;cv=10;N=150;
f2=@(x)((x-z).*normpdf(x,10,40));
eqns=[p-(b+beta.*(s-s0)+10+alpha.*c1)./(2.*alpha)+(int(@(x) f2(x),z,N))./(2.*alpha)==0,p-c1-(p-cv).*cdf('Normal',z,10,40)==0];
S=solve(eqns,[p,z]);
S.p
S.z
The result is [p z]=[30,-185], but I know that there exists the other solution [223, 63].
In order to find the latter solution, can I set the initial value of the solution in "solve" function? Like "fsolve" function? If the answer is yes,how?
Thank you very much!
0 Kommentare
Akzeptierte Antwort
Star Strider
am 12 Jul. 2020
The vpasolve function allows initial estimates and ranges, See: Find Multiple Solutions by Specifying Initial Guesses and related sections for more information.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!