Polyarea返回错误值 [英] Polyarea returns false value

查看:86
本文介绍了Polyarea返回错误值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

X = [0 0 1 1];

Y = [0 1 0 1];

polyarea(X,Y)

ans  = 0 

这里的答案应该是1,但是我得到了这个答案,没有其他坐标的概率

Here the answer should be 1 , but I got this as answer , there is no prob with other co ordinates

推荐答案

注意顶点顺序

X = [0 0 1 1];
Y = [0 1 1 0];

应该工作.

这篇关于Polyarea返回错误值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆