Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What does zeros(3,3) produce?
Think about what the function `zeros` does.
What function would you use to create a square matrix of size 2 filled with ones?
Remember the name of the function for ones and check how the size is defined.
What does the function ones(3,2) return?
Think about what the `ones` function creates.
True or False: The function eye(m,n) returns an m-by-n matrix filled with random numbers.
Recall what identity matrices are.
Create a 5x5 identity matrix and then create a 3x3 matrix filled with zeros. Combine them into a single matrix with the identity matrix on top of the zero matrix.
Think about how to concatenate matrices both vertically.
From the vector v = [10, 20, 30], create a diagonal matrix, and then replace the first diagonal element with 15. What is the new matrix?
Use the `diag` function and understand how indexing works.
5 more questions in this section. Enroll free to practise them all.
Enroll free