matlab中 solve函数取值进行比较遇到的问题。
Show older comments
Detad=10;
R=10;
x1=15;
y1=495;
x2=15;
y2=512;
syms x3 y3;
s=solve('(x3-x2)^2+(y3-y2)^2-Detad^2','(x3-x1)^2+(y3-y1)^2-4*R^2','x3,y3');
if s.x3(1)>s.x3(2)
错误提示:
??? Error using ==> sym.sym>notimplemented at 2621
Function 'gt' is not implemented for MuPAD symbolic objects.
Error in ==> sym.sym>sym.gt at 801
notimplemented('gt');
Error in ==> sycp at 86
if s.x3(1)>s.x3(2)
问题描述:
我这个是简单的例子,我主要问题是:已知三角形三边和两个顶点坐标,求第三个顶点坐标。并且是个迭代的过程,迭代过程中三边和其中一个顶点坐标不变,但其中一个顶点不断变化;这样迭代的求多个第三个位置顶点坐标。我在调试中,一直在
solve函数的取值中出问题,因为solve函数求出来的x3,y3都有两个值,我需要比较来求其中的一对值,求的的值用于下一步的迭代计算中
Accepted Answer
More Answers (0)
Categories
Find more on Calculus 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!