Contents
Ensimmäinen Matlab-kokeilu
Prosentti-merkki on kommentti
1+1 % Laskentaa
ans = 2
Piirretään
x=1:0.1:4
y=sin(x);
plot(x,y)
%
x = Columns 1 through 7 1.0000 1.1000 1.2000 1.3000 1.4000 1.5000 1.6000 Columns 8 through 14 1.7000 1.8000 1.9000 2.0000 2.1000 2.2000 2.3000 Columns 15 through 21 2.4000 2.5000 2.6000 2.7000 2.8000 2.9000 3.0000 Columns 22 through 28 3.1000 3.2000 3.3000 3.4000 3.5000 3.6000 3.7000 Columns 29 through 31 3.8000 3.9000 4.0000
Merkkijonoja
'Hello World' % Se pakollinen huudahdus!
ans = Hello World