matlab 的if 语句执行不了function[s,ts]=find(x000,y000)x0 = 550, y0 = 40; %站台原点1(550,40)x00 = 420, y00 = 40; %站台原点2(420,40)x000=500,y000=150;% a=sqrt((x-x0)^2+(y-y0)^2);% b=sqrt((x-x00)^2+(y-y00)^2);% c=x0-x00;i=0;j=0;fo
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 03:18:30
matlab 的if 语句执行不了function[s,ts]=find(x000,y000)x0 = 550, y0 = 40; %站台原点1(550,40)x00 = 420, y00 = 40; %站台原点2(420,40)x000=500,y000=150;% a=sqrt((x-x0)^2+(y-y0)^2);% b=sqrt((x-x00)^2+(y-y00)^2);% c=x0-x00;i=0;j=0;fo
matlab 的if 语句执行不了
function[s,ts]=find(x000,y000)
x0 = 550, y0 = 40; %站台原点1(550,40)
x00 = 420, y00 = 40; %站台原点2(420,40)
x000=500,y000=150;
% a=sqrt((x-x0)^2+(y-y0)^2);
% b=sqrt((x-x00)^2+(y-y00)^2);
% c=x0-x00;
i=0;
j=0;
for x=500:700
for y=1:200
a=sqrt((x-x0)^2+(y-y0)^2);
b=sqrt((x-x00)^2+(y-y00)^2);
c=sqrt((x-x000)^2+(y-y000)^2);
d1=x0-x00;
d2=x0-x000;
d3=x00-x000;
if (((1
matlab 的if 语句执行不了function[s,ts]=find(x000,y000)x0 = 550, y0 = 40; %站台原点1(550,40)x00 = 420, y00 = 40; %站台原点2(420,40)x000=500,y000=150;% a=sqrt((x-x0)^2+(y-y0)^2);% b=sqrt((x-x00)^2+(y-y00)^2);% c=x0-x00;i=0;j=0;fo
你的程序我直接复制了可以使用啊:
s =
16891
ts =
1457
你把最后的分号去掉,才可以看到s,t的输出结果