copy from workspace to csv file without loss of significant figures

1 visualizzazione (ultimi 30 giorni)
Hello,
I am trying to copy an array to excell using the csvwite function. It works very good and fast, BUT I am losing a lot of significant figures. I only keep 5 of them. This means a significant loss of data for my solution. I tried ctrl+C but matlab fails (stops working, have to restart matlab) It is a rather big array of 30.000+ values (double) Is there a way to copy it to a file without losing the data?

Risposta accettata

Mischa Kim
Mischa Kim il 20 Mar 2014
Modificato: Mischa Kim il 20 Mar 2014
Dries, how about using dlmwrite?
data = rand(3000,10);
dlmwrite('test.csv',data,'precision',15);

Più risposte (1)

Dries billiet
Dries billiet il 20 Mar 2014
But it only writes the first 3500 words... How is this possible?
  1 Commento
Mischa Kim
Mischa Kim il 20 Mar 2014
When you say words, do you mean strings (and not doubles)? What happens when you execute the code from my answer?

Accedi per commentare.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by