convert cell array to double error: Dimensions of arrays being concatenated are not consistent.

7 views (last 30 days)
Robert
Robert on 8 Mar 2022
Edited: Robert on 8 Mar 2022
I have a cell array like this:
T_input_mod =
{'456358'}
{'0' }
{'0' }
{'457' }
{'0' }
When I use this:
a = str2num(cell2mat(T_input_mod))
I encounter this error:
Error using cat
Dimensions of arrays being concatenated are not consistent.
Error in cell2mat (line 83)
m{n} = cat(1,c{:,n});
What should I do?

Accepted Answer

Simon Chan
Simon Chan on 8 Mar 2022
Use function str2double
  6 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!