20.07.2013 Views

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

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.

Stabler - Lx 185/209 2003<br />

octave:1> x=[1,2]<br />

x =<br />

1 2<br />

octave:2> y=[3;4]<br />

y =<br />

3<br />

4<br />

octave:3> z=[5,6;7,8]<br />

z =<br />

5 6<br />

7 8<br />

octave:4> x+x<br />

ans =<br />

2 4<br />

octave:5> x+y<br />

error: operator +: n<strong>on</strong>c<strong>on</strong>formant arguments (op1 is 1x2, op2 is 2x1)<br />

error: evaluating assignment expressi<strong>on</strong> near line 5, column 2<br />

octave:5> 2*x<br />

ans =<br />

2 4<br />

octave:6> x*y<br />

ans = 11<br />

octave:7> x*z<br />

ans =<br />

19 22<br />

octave:8> y*x<br />

ans =<br />

3 6<br />

4 8<br />

octave:9> z*x<br />

error: operator *: n<strong>on</strong>c<strong>on</strong>formant arguments (op1 is 2x2, op2 is 1x2)<br />

error: evaluating assignment expressi<strong>on</strong> near line 9, column 2<br />

137

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

Saved successfully!

Ooh no, something went wrong!