plot_ellipse.m
来自「麻省理工学院的人工智能工具箱,很珍贵,希望对大家有用!」· M 代码 · 共 19 行
M
19 行
% PLOT_ELLIPSE% h=plot_ellipse(x,y,theta,a,b)%% This routine plots an ellipse with centre (x,y), axis lengths a,b% with major axis at an angle of theta radians from the horizontal.%% Author: P. Fieguth% Jan. 98%%http://ocho.uwaterloo.ca/~pfieguth/Teaching/372/plot_ellipse.mfunction h=plot_ellipse(x,y,theta,a,b)np = 100;ang = [0:np]*2*pi/np;pts = [x;y]*ones(size(ang)) + [cos(theta) -sin(theta); sin(theta) cos(theta)]*[cos(ang)*a; sin(ang)*b];h=plot( pts(1,:), pts(2,:) );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?