I tried to solve this system of ecuation but somenthing it´s wrong :
this is the code:
Ay=1
Az=-2
By=2
Bz=-1
r=1
x = optimvar('x',2);
ec1=((x(1)-Ay)^2+(x(2)-Az)^2)==r^2;
ec2=((x(1)-(Ay))^2+(x(2)-(Az))^2)==((x(1)-((By))^2+(x(2)-(Bz))^2));
prob = eqnproblem;
prob.Equations.ec1 = ec1;
prob.Equations.ec2 = ec2;
show(prob)
x0.x = [1 -2];
[sol,fval,exitflag] = solve(prob,x0)
disp(sol.x)

 채택된 답변

Alan Weiss
Alan Weiss 2021년 3월 12일

1 개 추천

Do you have Optimization Toolbox™ installed? Check by running the ver command. You might need to install or reinstall.
Alan Weiss
MATLAB mathematical toolbox documentation

댓글 수: 2

monica lecue
monica lecue 2021년 3월 15일
NO, I am not sure if my license include Optimization toolbox .
monica lecue
monica lecue 2021년 3월 15일

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 3월 12일

댓글:

2021년 3월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by