matlab如何用6点画椭圆
展开全部
I think I was kind of solving out your question, but I am not very good at data visulation. So what I tried was to use 'fit curve' command to achieve your effect of some kind.
clear all
x = pi*(0:.5:2);
y = [0 2 0 -2 0 2 0;
1 0 1 0 -1 0 1];
pp = spline(x,y);
yy = ppval(pp, linspace(0,2*pi,101));
plot(yy(1,:), yy(2,:), '-b', y(1,2:5), y(2,2:5), 'or'), axis equal
Note: y(1,:) and y(2,:) stand for the value of x and y. The result of code generated is shown below. Hope you could get some idea of my incompetent code.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |