Info
This question is closed. Reopen it to edit or answer.
Error of converting cell into matices
2 views (last 30 days)
Show older comments
mint_data1(:,(2:3))
ans =
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
The input data is mint_data1. But it shows error when I run to convert cell into matrices
coord = cell2mat(mint_data1(:,(2:3)));
Could anyone guide?
3 Comments
Akira Agata
on 16 Jul 2017
I don't see any errors in the following code. Would you tell us more details on your trouble?
% Sample cell array (100x10) with randomly located empty cells
C = num2cell(randi(500,100,10));
% Convert C(:,2:3) into numeric array
M = cell2mat(C(:,2:3));
Rik
on 16 Jul 2017
I have the feeling mint_data is already a matrix. What is the output of the line of code below and what is the entire error message (all the red text)?
class(mint_data1)
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!