?? drawpolyline.m
字號:
function DrawPolyline(P,c)% DrawPolyline(P,c) - draw a polyline along the tips of the vector arguments% P: a cell array of GA vectors% c: an optional color argument%%See also gable.% GABLE, Copyright (c) 1999, University of Amsterdam% Copying, use and development for non-commercial purposes permitted.% All rights for commercial use reserved; for more information% contact Leo Dorst (leo@wins.uva.nl).%% This software is unsupported.l = length(P);if l < 2 error('DrawPolyline: requires at least two vector arguments');endif nargin == 1 c = 'b';elseif nargin > 2 error('DrawPolyline: takes only 2 arguments');endx = zeros(1,l);y = zeros(1,l);z = zeros(1,l);for i = 1:l v = m(GA(P{i})); if ~GAisa(GAZ(P{i}),'vector') error('DrawPolyline: all objects in P must be vectors.'); end x(i) = v(2); y(i) = v(3); z(i) = v(4);endplot3(x,y,z,c);hold on;axis('equal');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -