It is the first time that having a diagonal matrix matlab keeps writing the indices of the matlab element I am requiring and then the element values
below I report the results for matlab command window
1.0e+05 *
(1,1) -1.2727
(1,2) 0.0001
vv has been extracted from a structure
Can you explain this behviour

 Réponse acceptée

Bruno Luong
Bruno Luong le 6 Juil 2020

1 vote

It's a SPARSE matrix

4 commentaires

Marco Pirola
Marco Pirola le 6 Juil 2020
OK, how can I convert in a regular matrix or extract regular scalar from it?
Thanks a lot
Extract scalar between sparse and full matrix uses the same syntax
M(i,j)
To convert to full matrix
A = full(S)
Marco Pirola
Marco Pirola le 6 Juil 2020
Great, nice shot
Many thanks
Matt J
Matt J le 6 Juil 2020
@Marco,
Since you are clearly satisfied with Bruno's answer, you should Accept-click it.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by