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

 채택된 답변

Walter Roberson
Walter Roberson 2017년 2월 15일

0 개 추천

repelem using diff() of the indices as the counts

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

질문:

Sam
2017년 2월 15일

댓글:

Sam
2017년 2월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by