from
lift_pen.m
by Alan Bindemann
This function demonstrates how to use NaNs to "lift the pen" when using the 'line' command.
|
| lift_pen |
function lift_pen
clf
d =[20 -100 % M
20 100
40 -100
60 100
60 -100
NaN NaN % A
90 -100
110 100
130 -100
NaN NaN
120 -10
100 -10
NaN NaN % T
140 100
180 100
NaN NaN
160 100
160 -100
NaN NaN % L
200 100
200 -100
230 -100
NaN NaN % A
250 -100
270 100
290 -100
NaN NaN
260 -10
280 -10
NaN NaN % B
320 100
320 -100
350 -50
340 -10
320 10
340 40
340 70
320 100]
h=line(d(:,1),d(:,2));
set(h,'linewidth',10);
axis([0 350 -300 300]);
axis('off')
|
|
Contact us at files@mathworks.com