how to quickly decompressed a matrix

1 vue (au cours des 30 derniers jours)
Sam
Sam le 15 Fév 2017
Commenté : Sam le 15 Fév 2017
I have compressed matrix a, first row is index and second row is value, how can i convert it to full matrix b of 2x10 elements below?
a = [1 5 8;
0.2 0.6 -1.1];
b = [1 2 3 4 5 6 7 8 9 10;
0.2 0.2 0.2 0.2 0.6 0.6 0.6 -1.1 -1.1 -1.1];

Réponse acceptée

Walter Roberson
Walter Roberson le 15 Fév 2017
repelem using diff() of the indices as the counts
  1 commentaire
Sam
Sam le 15 Fév 2017
Thanks Walter

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Help Center 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