Convert cell array of cell arrays to matrix of matrices

后端 未结 5 1282
一向
一向 2021-01-05 05:37

I can convert a cell array of matrices to matrix:

>> C={[1,1]; [2,2]; [3,3]};
>> cell2mat(C)
ans =
     1     1
     2     2
     3     3
         


        
5条回答
  •  臣服心动
    2021-01-05 06:01

    I had the same error, I just commented out the lines in cell2mat that return the error and everything work fine to me.

    lines to comment out in cell2mat (51:53): (you can find them using dbstop if error)

    if cisobj || ciscell error(message('MATLAB:cell2mat:UnsupportedCellContent')); end

    I don´t think it is a good idea to change matlab functions, and I am pretty shameful of my solution myself, but it works.

提交回复
热议问题