%(x0,y0)为圆心,r为半径
%方法一
x0=5;
y0=10;
r=3;
theta=0:pi/50:2*pi;
x=x0+r*cos(theta);
y=y0+r*sin(theta);
plot(x,y,'-',x0,y0,'.');
axis square;
%方法二
rectangle('Position',[5-3,10-3,2*3,2*3],'Curvature',[1,1]);
axis square;
用matlab怎么画圆
用matlab怎么画圆
我要在一个图上画圆 ,知道圆心的坐标,怎么才能画圆 用rectangle怎么画 x=[pt(i,2)-r,pt(i,1)-r,2*r,2*r];
rectangle('Position',x,'Curvature',[1,1]); 其中 (pt(i,2) ,pt(i,1))是圆心的坐标,r为半径.可是我画出来的圆 ,圆心不在我指定的位置,
pt=[2 1; 204 90;327 136; 198 205; 134 218;148 256; 382 286;2 382];
r=20;
for i=1:size(pt,1)
text(pt(i,1),pt(i,2),['\color{red} +',num2str(i)]);
rectangle('position',[pt(i,1)-r,pt(i,2)-r,2*r,2*r],'Curvature',[1,1]);
end
axis square;
圆心不在制定的位置 pt 9*2的矩阵 ,存着圆心的位置
我要在一个图上画圆 ,知道圆心的坐标,怎么才能画圆 用rectangle怎么画 x=[pt(i,2)-r,pt(i,1)-r,2*r,2*r];
rectangle('Position',x,'Curvature',[1,1]); 其中 (pt(i,2) ,pt(i,1))是圆心的坐标,r为半径.可是我画出来的圆 ,圆心不在我指定的位置,
pt=[2 1; 204 90;327 136; 198 205; 134 218;148 256; 382 286;2 382];
r=20;
for i=1:size(pt,1)
text(pt(i,1),pt(i,2),['\color{red} +',num2str(i)]);
rectangle('position',[pt(i,1)-r,pt(i,2)-r,2*r,2*r],'Curvature',[1,1]);
end
axis square;
圆心不在制定的位置 pt 9*2的矩阵 ,存着圆心的位置
其他人气:416 ℃时间:2020-04-24 02:43:24
优质解答
我来回答
类似推荐
猜你喜欢
- 1什么是化合物,什么是氧化物.两者有区别吗?
- 2insist that sb should do这个词组对么?
- 3用表示时间变化的词语和比喻词,写某种事物的变化
- 4将下列分数约成最简分数
- 5—What do you think of the new movie?—It's OK,but not so ___ as the one we saw last month.
- 6他坐在黑板前面,我坐在教室后排. He sits _____ _____ _____ the blackboard, I sit in the back row.
- 715和4的最大公约数
- 8tom never works hard at his lessons,so it is not___to see a ___look on his face after the exam.
- 9谁帮我写一下作文,英语的,题目是我的理想生活.
- 10what is fifteen and thirteen,mike?..