Can I specify the numeric precision for each column when exporting the table data using writetable?
Mostrar comentarios más antiguos
I would like to specify the numeric precision for each column when exporting the table data using writetable function.
For example, in the following dataset, I would like to set A column to the last one digit and B column to the last three digits.
>> data = [(1:3)', rand(3,1)];
>> T = array2table(data,'VariableName',{'A','B'})
T =
A B
_ _______
1 0.81472
2 0.90579
3 0.12699
>> writetable(T,'mydata.csv','WriteRowNames',true)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!