I have a cell array that needs to be printed in a .txt file according to a specific format. I have tried some of the online help (including matlab central dlmcell but even that is not giving me the desired answer. Delimiter is \t.
cellarray = { ...
'AAPL' '2/20/2011' 100.5
'MSFT' '2/15/2011' 43.4551
} ;
The output should be in a .txt file with the following format: (using tab delimiter)
"AAPL" "2/20/2011" 100.5
"MSFT" "2/15/2011" 43.4551
The cell will have minimum of 8000 rows and a maximum of 15000. No rows would have empty columns. Is a vectorized solution possible? Shall appreciate your help.
The following will work for your example:
MATLAB reuses the formatting string until it runs out of inputs. In principle, you could construct the formatting string first:
Then