a = rand(1,3) a = 0.0462 0.0971 0.8235 a(1,1) ans = 0.0462 a(1,2) ans = 0.0971 a = rand(3,1) a = 0.6948 0.3171 0.9502 a = rand(3,3) a = 0.0344 0.7655 0.4898 0.4387 0.7952 0.4456 0.3816 0.1869 0.6463 b = eye(3) b = 1 0 0 0 1 0 0 0 1 a+b ans = 1.0344 0.7655 0.4898 0.4387 1.7952 0.4456 0.3816 0.1869 1.6463 a*b ans = 0.0344 0.7655 0.4898 0.4387 0.7952 0.4456 0.3816 0.1869 0.6463 a.*b ans = 0.0344 0 0 0 0.7952 0 0 0 0.6463 ls diary images cd images/ ls balloon.jpeg cat.jpg ip.jpg puppy.jpg squirrel.jpg candy.jpeg house.png light.png sails.png tree.jpeg im = imread('squirrel.jpg'); whos Name Size Bytes Class Attributes a 3x3 72 double ans 3x3 72 double b 3x3 72 double i 1x1 8 double ii 1x10 80 double im 300x215x3 193500 uint8 p 1x10 80 double r 300x215 64500 uint8 rc 300x215 64500 uint8 whos im Name Size Bytes Class Attributes im 300x215x3 193500 uint8 imagesc(im); impixelinfo r = im(:,:,1); whos r Name Size Bytes Class Attributes r 300x215 64500 uint8 imagesc(r); colormap gray colormap hot colormap winter colormap jet colormap gray rc = circshift(r, [1 50]); imagesc(rc); r = rc + b; {??? Error using ==> plus Integers can only be combined with integers of the same class, or scalar doubles. } i = 1:10 i = 1 2 3 4 5 6 7 8 9 10 i = 1:2:10 i = 1 3 5 7 9 p = zeros(1,10); p p = 0 0 0 0 0 0 0 0 0 0 for i = 1:10, p(i) = i^2; end p p = 1 4 9 16 25 36 49 64 81 100 diary off