The errors dimensions of materials being qualified are not persistent

actually in matlab, we often encounter this problem, you have a look at the cause of the problem, you know what is the reason, but sometimes, pretty sure your program will be a problem, but the error, a run is a newspaper is very embarrassed, but it is not your program logic has a problem, mainly because the following error

Dimensions of matrices being concatenated are not consistent.

Cell2mat is matlab function is commonly used in a function, function is to convert the inside of the cell format digital into digital, in fact, when the inside of the cell number is expressed as a character to, such as’ 1 ‘, ‘2’, ‘3’ some of these characters, Cell2mat can also be converted characters into Numbers, but when these characters into ’10’, ’11’, ’12, the situation is complicated, the system will be an error, then say:

Error using cat

Dimensions of matrices being concatenated are not consistent.

Error in cell2mat (line 84)

m{n} = cat(1,c{:,n});

the solution to this problem is to use the function str2num to convert to number.

to solve this problem, a search on the Internet, are all conversion, but it seems that it is no use, I do not have time to find a solution to this problem, I will find a solution after busy with this topic research.

Read More: