Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A = [1 2 ...
- 3; 7 8 9]
- B = [1, 2, 3; 7, 8, 9]
- C = [1 2 3
- 7,8,9]
- w1 = 1 : 0.31 : 3
- w2 = -3:7
- w3 = 10:-2:0
- X = ones(2)
- Y = eye(3)
- Z = rand(2,5) % round(10*rand(3))
- U = [A, X ; Z]
- V = [ [9:-1:7; 1:3], zeros(2,1); 1 1 1 1]
- V(1,3)
- V(3,1)
- V(:,2)
- V(2,:)
- V(2, 1:3)
- V(2, [1 3 4])
- V([1 3], [1 3 4])
- V(7)
- V(:)
- 8
- V(:,4) = []
- V(2,:) = []
- % V(1,1) = [] % !!!
- A = [1 0 0;
- 2 3 -1;
- 0 7 2]
- B = [1 0 3;
- -1 5 2;
- 2 2 2]
- A+B
- A-B
- A+2
- 2*A
- 2.*A
- disp('Mnozenie macierzowe')
- MM1 = A*B
- MM2 = B*A
- disp('Mnozenie tablicowe')
- MT1 = A.*B
- MT2 = B.*A
- disp(['Dzielenie',' ','macierzowe'])
- DM1 = A/B
- DM2 = A\B
- DM3 = B/A
- DM4 = B\A
- disp('Dzielenie tablicowe')
- DT1 = A./B
- DT2 = A.\B
- DT3 = B./A
- DT4 = B.\A
- disp(['Potego' 'wanie'])
- PM = A^2
- A*A
- 9
- PT = A.^2
- A.*A
- disp(['Transpozycja'])
- A.'
- A'
- C = [1-i 2i 3;
- -1 5+3i 2+3i;
- 3+i 2 2]
- C.'
- C'
- A == B
- A ~= B
- 2 < A
- % A > B
- % A < B
- % A >= B
- % A <= B
- ~A
- A & B
- % A | B
- % xor(A,B)
- A = [2 0 7;
- 0 0 1]
- all(A)
- any(A)
- a = 2
- b = 4
- if (a<b)
- k = -1
- elseif (a>b)
- k = 1
- else
- k = 0
- 10
- endif
- c = 2 ;
- switch c
- case 0
- zeros(2)
- case 1
- disp('wpisano 1')
- otherwise
- disp(['wpisano ' num2str(c) ' tym razem'])
- endswitch
- suma=0;
- wekt = 1:10 ;
- for k = wekt
- suma=suma+k;
- endfor
- S=suma;
- suma=0;
- k=1;
- while k<=10
- suma=suma+k;
- k=k+1;
- endwhile
- S=suma;
- suma=0;
- i=1;
- while i<=10
- suma=suma+i; break
- i=i+1;
- endwhile
- S=suma;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement