conversion double to array
조회 수: 231 (최근 30일)
이전 댓글 표시
i have data in double format and i want that data in array format
inder 34*1 double
it should be in this format
inder {...................}
댓글 수: 3
the cyclist
2021년 5월 27일
@Muhammad SULAMAN, it may seem to you that it is clear what you want, but it is not.
data {}
isn't meaningful MATLAB syntax in any way.
I'll reiterate @Geoff Hayes's suggestion that you give a small example -- using valid MATLAB syntax -- of what the input you have, and the output you want. (The input seems clear to me, but not the output.)
Also, see my solution. Is that what you want? If not, explain why.
채택된 답변
the cyclist
2021년 5월 27일
If you want your 34x1 double to be in a single cell of a cell array, then ...
inder = rand(34,1);
inderCell1 = {inder}
If you instead want a 34x1 cell array, where each element is in its own cell, then
inderCell34 = num2cell(inder)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!