This MATLAB Function is TRICKY 🙀

Published: 14 July 2022
on channel: Laplace Academy
1,761
28

Hello. welcome to Laplace Academy.
In this #short tutorial I'm going to introduce this MATLAB function: diag.
diag is the abbreviated form of diagonal matrix.

So to create a diagonal matrix out of a vector, just use diag function.

Also, you can extract the diagonal elements of a matrix using this command, diag(M).
It returns the diagonal elements in a column vector.
You can convert it into a row vector by transposing it. diag(M)'


On this page of the site you can watch the video online This MATLAB Function is TRICKY 🙀 with a duration of hours minute second in good quality, which was uploaded by the user Laplace Academy 14 July 2022, share the link with friends and acquaintances, this video has already been watched 1,761 times on youtube and it was liked by 28 viewers. Enjoy your viewing!