basic operations, could someone help me do this?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Gentrit Mehmeti
il 11 Nov 2019
Modificato: Gentrit Mehmeti
il 11 Nov 2019
Create two random matrices in Matlab, A (n x m) and B (m x n). a) Find the product ? = ? ∙ ?; b) Create a symmetric matrix D using C; c) Find the eigenvalues and eigenvectors of matrix D; d) Sort the eigenvalues and the eigenvectors according ascending/descending order of eigenvalues; e) Sort the eigenvalues and the eigenvectors according to a random order; f) Plot the eigenvalues and the accumulative eigenvalues; g) Plot the dot product matrix of eigenvectors as a 2D surface.
2 Commenti
Risposta accettata
aweller3
il 11 Nov 2019
This is a partial answer. To create a random mXn matrix you can use A=rand(m,n) with m rows and n columns, with random values between 0 and 1. For some purposes I think rand might not be truly random but this is way beyond my level. If you need integers randi(m,n) should work. For the product just type C=A*B
For the eigenvalues and eigen vectors lookup the eig function here: https://www.mathworks.com/help/matlab/ref/eig.html
[V,L]=eig(D) will give eigenvectors of D stored in V and eigenvalues stored in L once you find the matrix D.
Information on plot can be found here:
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Linear Algebra in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!