











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












% - ' - 0
!"# $ !" % &' "
()! !
()! *!
!# + ! $ !# $ $ $ ! !",(-./# 0) ! ",( -./
+ $1 ,()2 11 $3 4 5 $ $^ !",(-./# 6 7 8 $ 01 )
.
!# + !"(-./# 0) &'7 &"'7 " & $'7 &' >7:?7@ $ 333A 1 $ 1 ) &,' $ $ 333A 1 $ 1 ) &' $ 0 " 333B $ 0 0 $ 0$ )
.
!"(-./#!0! 0)
9 # % &'+ 0
$ ! !
$ % &'+ $
$ !!
a = 2; b = 3; c = 10; x = a:b:c x =?
% Code fragment size(x) ans = 10 20 x1 = 1:2:size(x,1) x1 =? y1 = 1:4:size(x,2) y1 =?
a = [1 2 3 5]; 1 : a(end) ans = ?
) 2/ - 5 = &> &? &@ A
!#)J !#I $ , IJ
!#)G !#> 15 , "/ #)G !#+ $! 3336 )G
0$ )
, @ % @ / -
% 5 @
% With in-built functions
rand(3,4) ones(3,4) zeros(3)
eye(4)
diag([1,2,3,4])
1./hilb(4)
magic(3)
% With brackets, semicolon
[1 2 3; 4: 7, 8, 9; 10 11 12]
, ( 6
$ . ) 6 J K ,
→
WeaverSt
HarrisT
FoodL
c
b
a
1.09 0.98 0.
1.24 0.86 0.
1.29 0.84 0.
5
D ( ; < ; & # < CC L ;6<N D - . 6
D B . + -( L ;,<N D 2O % & . %
D - , % ;< % 2C . ;*< . 2C . CC L - ;6<N D ( 0 ;<. 0 ;!< L . 6 CC L - ;6<N D % / - ;. 6<
D ) . 2 / CC ;!, !,<N D ) . !.! 2. CC ;,!<N D ) . CC ; ,<N D ) . /
D *' 2 CC L = * 0 ;!< ;!< ( ;!< AN
>& BK8#9 19L#' , $
7 5 &!' !"# (-# @ 7#711 $ @ !" 7#711 $ $ 8 1 ( - #6++E+;$ $ I #I I#: 0 I , 0 !"