MATLAB: How to convert struct to mat structure Dear sir I'm writing to get some help. I want to convert from struct to mat… to substitute by its values in other matrix Best Answer You might be able to usecell2mat( struct2cell( YourStructure ) )but a lot depends on what is inside your structure. Related SolutionsMATLAB: Saving structs If you're wanting to save the structure as a structure, don't put in the -struct flag. That saves all of the fieldnames as their own variables. ( http://www.mathworks.com/help/techdoc/ref/save.html)Just nix the '-struct' and it should work fine. MATLAB: Convert struct2mat This example perfectly works for me. Are you sure that your class struct is really a struct, or what kind of field does it contain? For instance: class=struct('a',3); cell2mat(struct2cell(class))This one can be converted to mat without any error. Related QuestionStruct arrayHow to extract the structure array from a cell arrayStruct arrayHow can i do loops (for cycles) with structCellStruct
Best Answer