RIP
Tutorial
Tags
Topics
Examples
eBooks
Tutorial by Examples
Creating a matrix of 0s
z1 = zeros(5); % Create a 5-by-5 matrix of zeroes z2 = zeros(2,3); % Create a 2-by-3 matrix
Creating a matrix of 1s
o1 = ones(5); % Create a 5-by-5 matrix of ones o2 = ones(1,3); % Create a 1-by-3 matrix / vector of size 3
Creating an identity matrix
i1 = eye(3); % Create a 3-by-3 identity matrix i2 = eye(5,6); % Create a 5-by-6 identity matrix
Page 1 of 1
1
Cookie
This website stores cookies on your computer.
We use cookies to enhance your experience on our website and deliver personalized content.
For more details on our cookie usage, please review our
Cookie Policy
and
Privacy Policy
Accept all Cookies
Leave this website