matlab函数调用function[s,theta]=dist(x1,y1,z1,x2,y2,y3

发布时间:2021-02-25 09:34:19

matlab函数调用function[s,theta]=dist(x1,y1,z1,x2,y2,y3)s=sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2);theta(1)=asin((x2-x1)/s)*180;theta(2)=asin((y2-y1)/s)*180;theta(3)=asin((z2-z1)/s)*180;matlab中上述函数,在命令窗口输入[s,th

网友回答

函数定义的有问题,改一下:
function [s,theta]=dist(x1,y1,z1,x2,y2,z2)
s=sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2);
theta(1)=asin((x2-x1)/s)*180;
theta(2)=asin((y2-y1)/s)*180;
theta(3)=asin((z2-z1)/s)*180;
以上问题属网友观点,不代表本站立场,仅供参考!