# How to use MATLAB to complete the rank of a matrix?

7 vues (au cours des 30 derniers jours)
Ali Almakhmari le 10 Nov 2023
Modifié(e) : John D'Errico le 10 Nov 2023
I have this matrix here:
Wc=[0 0.285714285714286 0 0.918367346938775 0 9.83965014577259
0.285714285714286 0 0.918367346938775 0 9.83965014577259 0
0 -0.214285714285714 0 -2.29591836734694 0 -24.5991253644315
-0.214285714285714 0 -2.29591836734694 0 -24.5991253644315 0
0 -0.214285714285714 0 -2.29591836734694 0 -24.5991253644315
-0.214285714285714 0 -2.29591836734694 0 -24.5991253644315 0];
The rank of this matrix is 4 because column 3 and column 4 are linearly dependent. How can I use MATLAB to replace column 3 and column 4 with columns that will make the rank full (six)?
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponse acceptée

John D'Errico le 10 Nov 2023
Modifié(e) : John D'Errico le 10 Nov 2023
Trivial.
Replace the offending columns with vectors of random numbers. DONE. With probability 1, the result will be full rank. NOT random integers. Use rand, or randn.
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

R2022b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by