my solve cant work again
Show older comments
clc;clear;close all;
s_length=0.125;
m=0;n=0;
a=-s_length/4+m%location of a (x=-0.03125,y=0);
b=s_length/4+n %location of b (x= 0.03125,y=0);
x1=5;y1=8; %location of c;
lac85=sqrt((x1-a).^2+(y1).^2);%distance of ac;
lbc85=sqrt((x1-b).^2+(y1).^2);%distance of bc;
dl85=lac85-lbc85;
x2=-4;y2=4; %location of c;
lac44=sqrt((x2-a).^2+(y2).^2);
lbc44=sqrt((x2-b).^2+(y2).^2);
dl44=lac44-lbc44;
syms a1 b1
eq1= sqrt((x1-a1).^2+(y1).^2)-sqrt((x1-b1).^2+(y1).^2)==dl85;%establish an equation using the difference of two distances
eq2= sqrt((x2-a1).^2+(y2).^2)-sqrt((x2-b1).^2+(y2).^2)==dl44;
[a1,b1]=solve(eq1,eq2,a1,b1,'Real', true);
double(a1)
double(b1)
%%%%%%%%%%%%%%%%%%%%%%%%%%the error
警告: Possibly spurious solutions.
警告: Solutions are parameterized by the symbols: x. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
警告: Solutions are only valid under certain conditions. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
错误使用 symengine
Unable to convert expression containing symbolic variables into double array. Apply 'subs' function first to substitute values for variables.
Xstr = mupadmex('symobj::double', S.s, 0);
Accepted Answer
More Answers (0)
Categories
Find more on Symbolic Math Toolbox 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!