MATLAB Answers

Eliminate the var of the first line of .txt

1 view (last 30 days)
han han
han han on 6 Sep 2019
Commented: han han on 6 Sep 2019
This is my code,I don't want to have the first line in .txt(var_1....)
%---------------------
z = '//';
a1 = 'SystemMode';
a2 = 'SimulationTime';
A = table({a1,1,z;a2,100,z});
% Write data to text file
writetable(A,'TEST.txt','Delimiter',' ')
type 'TEST.txt'
How can I do

  0 Comments

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 6 Sep 2019
writetable(A,'TEST.txt','Delimiter',' ','writevariablenames',false)

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!