Error when solving system of equations with fsolve
조회 수: 2 (최근 30일)
이전 댓글 표시
I have the following system to solve:
syms x
f = @(x) [(2*x(1).^2-2.*x(2).^3+1)/4; (-x(1).^4-4*x(2).^4+8.*x(2)+4)/12];
R = fsolve(f,[0 0]);
Instead of writing f as suggested above I wanted to write f as the shown below:
f1=(2*x(1).^2-2.*x(2).^3+1)/4;
f2=(-x(1).^4-4*x(2).^4+8.*x(2)+4)/12;
f=[f1;f2];
when I insert the command
R = fsolve(f,[0 0]);
I get the following error.
Error using mupadmex
Error in MuPAD command: Index exceeds matrix dimensions.
Error in sym/subsref (line 1389)
B = mupadmex('symobj::subsref',A.s,inds{:});
댓글 수: 0
채택된 답변
Matt J
2013년 5월 13일
You cannot use FSOLVE to solve symbolic equations. You would use SOLVE instead.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!