| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 778 人关注过本帖
标题:输入两个坐标求距离 NORM具体求法 步骤
只看楼主 加入收藏
汉堡爱天气
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2013-5-16
结帖率:100%
收藏
 问题点数:0 回复次数:1 
输入两个坐标求距离 NORM具体求法 步骤
NORM
2013-05-21 23:12
unix1993
Rank: 1
等 级:新手上路
帖 子:6
专家分:2
注 册:2013-7-31
收藏
得分:0 
程序代码:
function distance = dist2 (x1, y1, x2, y2)
distance = sqrt((x2-x1).^2 + (y2-y1).^2);
disp('Calculate the distance between two points:');
ax = input ('Enter x value of point a:');
ay = input ('Enter y value of point a:');
bx = input ('Enter x value of point b:');
by = input ('Enter y value of point b:');
result = dist2 (ax, ay, bx, by);
fprintf('The distance between points a and b is %f \n', result);

嘿嘿,我是一个初学者。
2013-07-31 16:15
快速回复:输入两个坐标求距离 NORM具体求法 步骤
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014147 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved