Loading and plotting .dat files
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
My code written in the editor saves the data generated running the program into two files. In the matlab command window I want to load these files in order to plot the data stored into them.
However after searching the matlab help and trying load/uiimport/importdata etc I just get error messages or if it is loaded I am unsure how to then plot the data?
This is the error message I get when using load:
load radcon_t.dat
??? Error using ==> load
Number of columns on line 1 of ASCII file N:\My Documents\Dissertation\radcon_t.dat
I cannot understand how to solve this error so I was wondering if anyone could help with this problem?
Any help is much appreciated!! Thanks must be the same as previous lines.
0 Commenti
Risposte (2)
Fangjun Jiang
il 17 Nov 2011
How is the data saved? If there is no particular reason, why don't save it as .mat file, instead of the ASCII format? It's much easier and you can recover the variable name. See help save.
If you have to save the data in ASCII format, then try load it using d=importdata('radcon_t.dat'), or post a snip of the data file so others can see what is the problem.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!