MATLAB Answers

Convert values in the cell to array using cell2mat

조회 수: 2(최근 30일)
Turbulence Analysis
Turbulence Analysis 2021년 7월 16일
댓글: Turbulence Analysis 2021년 7월 16일
I have 72 x 1 cell named let's say output1, each cell got 8 x 1 entries. Now, I intend to store each 8 x 1 entries into the seperate array, such that finally I will get 8 x 72 array.
I used cell2mat(output1) Instead of 8 x 72 array, it stores all entries in the single column i.e. i got 576 x 1 , please let me know how to get this ..

채택된 답변

Stephen 2021년 7월 16일
편집: Stephen 2021년 7월 16일
The robust approach:
out = horzcat(output1{:})
  댓글 수: 3
Turbulence Analysis
Turbulence Analysis 2021년 7월 16일
Thanks a lot for directing to the link.. It did the job perfectly..

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

추가 답변(1개)

Akshit Bagde
Akshit Bagde 2021년 7월 16일
Convert the cell array to a row vector, and then try. It should work

Community Treasure Hunt

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

Start Hunting!

Translated by