26-Sep-2012 1> pwd ans = C:\cygwin\home\achilles 2> 3*4 ans = 12 3> ans*4 ans = 48 4> 3 + 4 ans = 7 5> 3 - 4 ans = -1 6> 3/4 ans = 0.75000 7> 3 4 parse error: syntax error >>> 3 4 ^ 7> 2^10 ans = 1024 8> 9^(1/2) ans = 3 9> 8^(1/3) ans = 2 10> (-1)^(1/3) ans = 0.50000 + 0.86603i 11> sqrt(3)/2 ans = 0.86603 12> x error: `x' undefined near line 12 column 1 12> achilles error: `achilles' undefined near line 12 column 1 12> 'achilles' ans = achilles 13> % in MATLAB tutto e' matrice = tabella 13> a = [1 2; 3 4] a = 1 2 3 4 14> nome = 'achilles' nome = achilles 15> size(a) ans = 2 2 16> size(nome) ans = 1 8 17> nome nome = achilles 18> cognome error: `cognome' undefined near line 18 column 1 18> image(a) 19> imagesc(a) 20> x = [0 pi/6 pi/4 pi/3 pi/2] x = 0.00000 0.52360 0.78540 1.04720 1.57080 21> y = sin(x) y = 0.00000 0.50000 0.70711 0.86603 1.00000 22> sin(a) ans = 0.84147 0.90930 0.14112 -0.75680 23> plot(x,y) 24> x = linspace(0,2*pi) x = Columns 1 through 7: 0.00000 0.06347 0.12693 0.19040 0.25387 0.31733 0.38080 Columns 8 through 14: 0.44427 0.50773 0.57120 0.63467 0.69813 0.76160 0.82506 Columns 15 through 21: 0.88853 0.95200 1.01546 1.07893 1.14240 1.20586 1.26933 Columns 22 through 28: 1.33280 1.39626 1.45973 1.52320 1.58666 1.65013 1.71360 Columns 29 through 35: 1.77706 1.84053 1.90400 1.96746 2.03093 2.09440 2.15786 Columns 36 through 42: 2.22133 2.28479 2.34826 2.41173 2.47519 2.53866 2.60213 Columns 43 through 49: 2.66559 2.72906 2.79253 2.85599 2.91946 2.98293 3.04639 Columns 50 through 56: 3.10986 3.17333 3.23679 3.30026 3.36373 3.42719 3.49066 Columns 57 through 63: 3.55413 3.61759 3.68106 3.74452 3.80799 3.87146 3.93492 Columns 64 through 70: 3.99839 4.06186 4.12532 4.18879 4.25226 4.31572 4.37919 Columns 71 through 77: 4.44266 4.50612 4.56959 4.63306 4.69652 4.75999 4.82346 Columns 78 through 84: 4.88692 4.95039 5.01385 5.07732 5.14079 5.20425 5.26772 Columns 85 through 91: 5.33119 5.39465 5.45812 5.52159 5.58505 5.64852 5.71199 Columns 92 through 98: 5.77545 5.83892 5.90239 5.96585 6.02932 6.09279 6.15625 Columns 99 and 100: 6.21972 6.28319 25> y = sin(x); 26> plot(x,y) 27> axis equal 28> grid 29> plot(x,y) 30> print('seno.pdf') 31> quit