Info

此问题已关闭。 请重新打开它进行编辑或回答。

Error of converting cell into matices

1 次查看(过去 30 天)
Ei Ei Mon
Ei Ei Mon 2017-7-7
关闭: MATLAB Answer Bot 2021-8-20
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 个评论
Akira Agata
Akira Agata 2017-7-16
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
Rik 2017-7-16
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)

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by