Have you a registration already ? Sign In
Creating Points On Sketches In Solidworks(Illustrated Expression)
There are very useful Matlab codes to obtain specific matrices in short way which makes the Matlab is very useful tool to deal with matrices. One of these commands is the ‘repmat()’ command that you can use this to create matrices in desired dimensions with desired same number. In this article we will explain the use of ‘repmat()’ command in Matlab to obtain these matrices.
We created the ‘a’ matrix by using the ‘repmat()’ command in Matlab as shown by red arrow above. If you look at the ‘a’ variable as shown in red box above, a 5×5 matrix that includes only the number of 3 is created. So as you undertstand that, you need to type the number that you want first, and the dimensions of the matrix that you want respectively inside the ‘repmat()’ command in Matlab.
We multiplied the matrix ‘a’ with 3 then we assigned it to the variable ‘b’ as shown by green arrow above. If you look at the result as shown in green box, the whole elements of matrix ‘a’ is multiplied with 3 which means we can do mathematical operations with matrices that created with ‘repmat()’ command in Matlab.
So the use of ‘repmat()’ command is very simple like this in Matlab.
Leave your commentsand questions below!
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Write Comments