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

Geoff Hayes
Geoff Hayes 2021년 5월 27일
Muhammad - isn't inder already an array with dimension 34x1? Or do you want to convert it to a cell array? Please add an example of what you are attempting to do.
i have data in double format
this is in work space
data 34*1 double
i want to convert it into
data {}
@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
the cyclist 2021년 5월 27일

0 개 추천

If you want your 34x1 double to be in a single cell of a cell array, then ...
inder = rand(34,1);
inderCell1 = {inder}
inderCell1 = 1×1 cell array
{34×1 double}
If you instead want a 34x1 cell array, where each element is in its own cell, then
inderCell34 = num2cell(inder)
inderCell34 = 34×1 cell array
{[0.2527]} {[0.0156]} {[0.7175]} {[0.2866]} {[0.1045]} {[0.6102]} {[0.1754]} {[0.0870]} {[0.8349]} {[0.4660]} {[0.8169]} {[0.7427]} {[0.4546]} {[0.5289]} {[0.4183]} {[0.2509]}

추가 답변 (0개)

카테고리

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

태그

질문:

2021년 5월 27일

댓글:

2021년 5월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by