A = [1 2 3; 4 5 6; 7 8 9] B = [1 2 3; 4 5 6] C = [1; 2; 3] D = [1 4 3] H0 = (1:10) H1 = 1:0.6:3 H2 = linspace(1,0.1,6) H3 = logspace(1,3,3) ME1 = zeros(3,2) ME2 = ones(4,1) ME3 = eye(3) ME4 = rand(2,2) ME5 = randn(3,1) xn = 2+0.5*randn(3,3) xu = 2+(4-2)*rand(2,2) A = [1 2 3; 4 5 6; 7 8 9] B = [1 1 1; 2 2 2; 3 3 3] S = A + B R = A - B MM = A*B P = A^2 % Idem P = A*A C = rand(3,3) Ctrans = C' IV = inv(C) DI = C \ A % Idem DI = inv(C)*A A B Me = A.*B Pe = A.^2 v = [1 2 3]' g = [3 4 5]' v.*g A a22 = A(2,2) a31 = A(3,1) A([1 2],[1 2]) subA1 = A(1:2,1:2) subA2 = A(2:3,1:3) subA3 = A(2,:) subA4 = A(:,2:3) subA5 = A(2:end,3) B=rand(4,6) Ind = 1:4 subB1 = B(Ind,5) subB2 = B(1:4,5) Indc = [1 3 4] Indf = [2 4] subB3 = B(Indf,Indc) A = rand(3,2) B = rand(2,2) C = [A ; B] % Concatenar verticalmente A y B D = [A' B] % Concatenar horizontalmente la traspuesta de A con B A = rand(3,3,3) Asub = A(2,2,3)