Print Table to a File.
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pappu Murthy
am 20 Mai 2018
Kommentiert: Pappu Murthy
am 24 Mai 2018
I have this code
VarNames={'Col1', 'Col2'};
RowNames={'Row1', 'Row2'};
A = [1 2;3 5];
Ta = array2table(A,'VariableNames',VarNames,'RowNames',RowNames)
When I execute this i get table printed properly formatted but on to a screen.
I like similar tables one after other several of them, to a file properly formatted every time.
all tables are of equal size. I tried writetable but that does not seem to be the answer.
How do I do it? Thanks in advance.
2 Kommentare
Akzeptierte Antwort
Image Analyst
am 20 Mai 2018
Try fopen(), fprintf(), and fclose(). With those three functions you can make it look exactly how you want it to look.
2 Kommentare
Walter Roberson
am 21 Mai 2018
Make sure you use width specifications on all of your % formats, to get everything lined up the way you want.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical 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!