how to get the value from the variable?

조회 수: 2 (최근 30일)
Elysi Cochin
Elysi Cochin 2014년 5월 16일
댓글: David Sanchez 2014년 5월 16일
while executing a code i got a variable D... and its val when clicked from the workspace is as shown in the link below...
Please can someone tell me what that symbol near D in workspace means... and how to copy the values of the D displayed into a variable as row vector.... the D displayed as val has 590 values downwards...
please can someone explain to me, then what that D dimension 1600*59 means....

채택된 답변

David Sanchez
David Sanchez 2014년 5월 16일
It's the symbol for a sparse matrix.
  댓글 수: 2
Elysi Cochin
Elysi Cochin 2014년 5월 16일
how can i get the values to a row vector....
David Sanchez
David Sanchez 2014년 5월 16일
D is a 1600x59 array. To make it a single row vector:
[r c] = size(D);
D2 = reshape(D,1,r*c);
The values presented in val are the non-zero elements of your sparse matrix. You see the position of the non-zero element in the first column and its value in the second column. Elements not listed in var are 0.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by