Matlab cell2mat error: all contents of the input cell array must be of the same data type -


I'm trying to apply the cell2mat function to a cell with a string that is empty or integer I get this error That the contents of the cell are not the same data type, even when I run "iscellstr" on an index with an empty string and an index with an integer sting, returned both 1, to the right. What else can be caused by this error?

Try to use instead of cell 2 mat.

You have empty cells [] instead of the empty string '' .

Example:

  & gt; & Gt; ; M = {'123'; ''; []; '-2'} M = '123' '' [2]   

Notice is empty cells and empty string. Cell2 matte increases this error:

  & gt; & Gt; All the contents of the error input cell array using cell2 matte (M) cell2 matte (line 46) should be of the same data type.   

but str2double returns:

  & gt; & Gt; Str2double (M) ans = 123NNNN-2    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -