15.05.2015 Views

manual de introdução ao matlab - Escola Superior Náutica Infante D ...

manual de introdução ao matlab - Escola Superior Náutica Infante D ...

manual de introdução ao matlab - Escola Superior Náutica Infante D ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.6 - UTILIZAR VÁRIAS JANELAS COM FIGURAS<br />

h1=figure<br />

h1 =<br />

1<br />

plot(x,y),axis([0 2*pi -1 1]),title('sin(x)')<br />

h2=figure<br />

h2 =<br />

2<br />

plot(x,z),axis([0 2*pi -1 1]),title('cos(x)')<br />

h3=figure<br />

h3 =<br />

3<br />

plot(x,a),axis([0 2*pi -1 1]),title('2sin(x)cos(x)')<br />

h4=figure<br />

h4 =<br />

4<br />

plot(x,b),axis([0 2*pi -20 20]),title('sin(x)/cos(x)')<br />

figure(4)<br />

grid<br />

close<br />

close (2)<br />

help close<br />

clf<br />

GINPUT Graphical input from a mouse or cursor.<br />

[X,Y] = GINPUT(N) gets N points from the current axes and returns<br />

the X- and Y-coordinates in length N vectors X and Y. The cursor<br />

can be positioned using a mouse (or by using the Arrow Keys on some<br />

systems). Data points are entered by pressing a mouse button<br />

or any key on the keyboard. A carriage return terminates the<br />

input before N points are entered.<br />

[X,Y] = GINPUT gathers an unlimited number of points until the<br />

return key is pressed.<br />

[X,Y,BUTTON] = GINPUT(N) returns a third result, BUTTON, that<br />

contains a vector of integers specifying which mouse button was<br />

used (1,2,3 from left) or ASCII numbers if a key on the keyboard<br />

was used.<br />

ENIDH/DMM – Luis M. Mendonça<br />

Pág.43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!