Associate numeric values to object arrays
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a table with a list of numerical sequences. Here you can see how each object looks like:
>>x
x=
0 1 2 0 1 2
1 2 0 1 2 0
>> class(x)
ans =
'double'
>> A(1,1:3000)
ans =
Columns 1 through 16
0.3616 0.3090 0.2184 0.1905 0.2085 0.1760 0.1237 0.0691 0.0802 0.0427 -0.0064 -0.0402 -0.0670 -0.0386 0.0134 0.0204
Columns 17 through 30
0.0356 0.0732 0.1071 0.1062 0.0400 0.0064 -0.0789 -0.1627 -0.1519 -0.0841 -0.0818 -0.1089 -0.1376 -0.0800
I want to convert each number to an object previously created. For instance, A, B and C are class double (vectors of 1*3000). Therefore we want to associate an convert 0 to A, 1 to B and 2 to C. To sum up, convert the numerical sequence to a sequence of objects.
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!