how to save a table to .asc file

11 vues (au cours des 30 derniers jours)
Odysseas Makariou
Odysseas Makariou le 27 Juil 2022
hello I used the following code to generate a table which I want to save as a text, excel and asc file. I have managed to do the first to but I can't seem to convert it to a asc file. The table is generated in the correct format as i can convert the text file by manually saving it as '.asc' Essentially the asc file will be imported in a CAD software. Any suggestions? Thanks
blade_L_e={X_guides,blade(1).L_e(:,1),Y_guides,blade(1).L_e(:,2),Z_guides,blade(1).L_e(:,3)}; %table in X,coordinate,Y,coordinate,Z,coordinate
tab_L_e = table(blade_L_e{:});
writetable(tab_L_e,'L_e.txt', 'WriteVariableNames', false,'Delimiter',' ')
writetable(tab_L_e,'L_e.xlsx', 'WriteVariableNames', false)

Réponse acceptée

Walter Roberson
Walter Roberson le 27 Juil 2022
writetable(tab_L_e, 'L_e.asc', 'WriteVariableNames', false, 'Delimiter', ' ', 'Filetype', 'text')
  1 commentaire
Odysseas Makariou
Odysseas Makariou le 27 Juil 2022
Great thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by