필터 지우기
필터 지우기

how to convert 66 x 2 cell array into matrix

조회 수: 2 (최근 30일)
Ei Ei Mon
Ei Ei Mon 2017년 7월 11일
댓글: Ei Ei Mon 2017년 7월 11일
a =
16 282
54 96
64 134
70 52
87 108
88 135
97 266
101 42
104 84
106 53
107 174
114 262
116 57
123 169
124 87
124 260
138 77
139 60
141 23
143 81
149 230
153 246
161 222
163 147
163 268
169 21
169 121
173 185
174 36
176 67
176 275
177 246
191 71
194 48
203 36
205 101
209 118
209 224
212 64
213 104
218 32
221 81
223 109
228 32
228 130
235 61
236 132
238 73
243 203
246 66
247 156
260 131
260 176
261 229
262 152
269 236
272 187
279 159
280 174
289 69
291 39
292 96
294 121
305 266
306 335
312 301
I got an error when I convert cell into matrix
c=cell2mat(a);
  댓글 수: 3
Ei Ei Mon
Ei Ei Mon 2017년 7월 11일
I have a cell array of size 66X2 double. I want to change this cell array into matrix using cell2mat. But I got an error: Cell contents reference from a non-cell array object. Error in cell2mat (line 42) cellclass = class(c{1});
KSSV
KSSV 2017년 7월 11일
That's what my questions is: you have a cell array of size 66X2 and each cell got what values?

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

채택된 답변

Rik
Rik 2017년 7월 11일
A cell array will not show up as "66X2 double". Only a matrix of type double (the standard type) will do that. So the answer is that cell2mat fails, because a already is a matrix.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by