CELL2MAT does not support cell arrays containing cell arrays or objects.
81 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hello guys.Can you understand Chinese?The sentence in blue means that "CELL2MAT does not support cell arrays containing cell arrays or objects".I never see any error like this.I translated it into English by Google Translator.So it may be not accurate.Do anyone experience this error.Could you please tell me how to do?By the way,my MATLAB version is R2019b,the code is earlier.So i think whether the old version and the new version are incompatible.I think the code itself don't have grammatical errors.Thank you for your answer!
12 Kommentare
Walter Roberson
am 9 Mär. 2020
That model was designed for MATLAB R13SP1, which was from 2003. It is not surprising that it does not work in current releases.
Antworten (1)
Guillaume
am 23 Feb. 2020
Bearbeitet: Guillaume
am 24 Feb. 2020
Indeed cell2mat does not support converting a cell array containing objects into a matrix. It looks like your cell array contains axes handles. Prior to R2014b axes handles used to be plain numbers so indeed you could convert a cell array of axes handles to a matrix. From R2014b, axes handles are objects and the error would appear.
Without knowing the exact details of what is in your cell array (shape and size) it's not easy to tell you how to solve the problem. Hence why Walter asked you to run the celldisp, so we could see what's in there.
Assuming that each cell contains a single axes handle, or row vectors of axes handles, then:
axes_mat = [ax_cell{:}];
If the cells contain column vectors/of axes handles:
axes_mat = vertcat(ax_cell{:});
If they contain 2D or ND matrix, it will be more complicated.
edit: following the output of celldisp being shown:
Since the cell array contains scalar axes handles, any of the above would work.
1 Kommentar
Siehe auch
Kategorien
Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!