how to quickly decompressed a matrix

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];

 Risposta accettata

Walter Roberson
Walter Roberson il 15 Feb 2017

0 voti

repelem using diff() of the indices as the counts

Più risposte (0)

Categorie

Scopri di più su MATLAB in Centro assistenza e File Exchange

Prodotti

Richiesto:

Sam
il 15 Feb 2017

Commentato:

Sam
il 15 Feb 2017

Community Treasure Hunt

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

Start Hunting!

Translated by