cir.m

来自「基于MATLAB的辅助设计 简述了矩阵分析的重要性」· M 代码 · 共 17 行

M
17
字号
function h=cir(r,x,y)
%
% CIR is a function that draw a cirkel on the screen.
% X and Y are the cordinate of tthe cirkel and r is the radius.

%    Authors: Dingyu XUE, The University of Sussex 
%             Ole Barup Sorensen, Rapid Data Ltd 

%    Copyright (c) 1989-94 by Rapid Data Ltd
%    Revision 10:36  07/02/94

w=0:0.1:2*pi;
x1=r*cos(w);
y1=r*1.5*sin(w);
h=line(x+x1,y+y1);
set(h,'Color','w','LineWidth', 2);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?