

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various examples of matlab commands and their corresponding output notes. It covers topics such as creating matrices, performing arithmetic operations, generating plots, and using functions. Students and researchers in engineering, physics, and mathematics may find this document useful for understanding the basics of matlab programming.
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Commands Output Notes
A = [1 2 3; 4 5 6; 7 8 9] a = 10 sin(a) format long sin(a) a = [1 2 3] b = [1; 2; 3] c = [1 2 3]' A = ones(5) B = ones (5,1) C = ones(1,5) A = eye(4) B = rand(6,2) C = zeros(2,5) a = 1: b = 1:0.5: c = linspace(1,10,3) A = ones(3,3) B = 2ones(3,3) C = AB D = inv(A)B A = ones(3,3) b = rand(3,1) c = rand(1,3) Ab Ac A = 2ones(3,2) B = [1 2; 3 4; 5 6] AB A.B A = [1 2 3; 4 5 6; 7 8 9] B = A(2,3) C = A(1:2, 1:3) D = A(5,5) A(5,5) = pi A = 2*ones(4) A^ A.^ A = [1 2 3; 4 5 6; 7 8 9] A(:) A = [1 2 3; 4 5 6; 7 8 9] a = [1 2 3] sum(A,1) sum(A,2) sum(a)