How to write a cell array with different data types to a text file while still maintaining the same row and column dimensions of the cell array
1 view (last 30 days)
I have a large cell array which is around 4000x7. It is composed of segments of different .txt files that were read in using textscan. Bits and pieces of these .txt files were taken to make the cell array. I now want to write this cell array to a new .txt file while maintaning the same dimensions that are in my cell array. The problem is that this cell array is made up of a variety of data types: doubles, strings, empty cell, and cell data types. And they are not in a pattern within the cell array (meaning they aren't organized by column or row for a particular datatype). I have spent a long time looking over Mathworks and haven't found anything that really helped. Alot of examples I did find gave me errors (because of the cell data type) or weren't really feasible for the size of the cell array I was dealing with. I did find several references to a cprintf and I tried to utilize it, but was unsuccessful. Any help would be much appreciated!