use vpasolve's engine without vpasolve
이전 댓글 표시
I have a function Y=F(X) where x and y are both 1*n vectors. I want to find X such that F(X)=[0,0....0,0]. i tried using fmincon or fminsearch (with the avsolute value of F) but they failed miserably.
one thing that partialy worked was using vpasolve by writing down (for example for n=3):
function Y1=F1(X1,X2,X3)
Y=F([X1,X2,X3])
Y1=Y(1)
end
and similary for F2 F3. then I wrote
syms x y z
vpasolve(0==F1(x,y,z),0==F2(x,y,z),0==F3(x,y,z))
in short, vpasolve worked well but required defining the equations in a weird way.this certainly cannot be used when n=12 for example.
my question is if there is a different function that uses the same engine or a way to access the engine of vpasolve directly. I tried to open vpasolve's source code but couldn't understand it.
would be thankfull for any assistance
채택된 답변
추가 답변 (1개)
John D'Errico
2021년 3월 7일
0 개 추천
You cannot access vpasolve without using vpasolve. There is no way to access the code for vpasolve.
You cannot use fminsearch on a function with 12 variables. It will converge poorly.
You MAY be able to ue fmincon. While you claim that it failed miserably, is is very possible that you did not know how to use it.
If you have vpasolve, one solution may be simply to learn how to write the equations properly. It sounds like you really just don't understand how to do that. The same applies for fsolve.
But as Steve has said, the real question is what are your equations, not some meaningless contrived set. It is difficult to help you lacking that.
카테고리
도움말 센터 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!