Data Import/export from figure Matlab GUI

1 Ansicht (letzte 30 Tage)
D Bhuiyan
D Bhuiyan am 5 Nov. 2011
Hello, I need to analyze some data for experiment. So, I read the data from .txt file into the Matlab GUI and plotted a figure in log scale. Now, How can I return the data into Excel file/Notepad from the plotted figure of Matlab GUI. Can anybody help me?
Thanks..... D Bhuiyan

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 5 Nov. 2011
After processing your original data, you can use xlswrite() or dlmwrite() or csvwrite() to write the data to a file. For more flexible output, you need to use fopen(), fprintf(),fclose(). Check the help for sprintf() to find out the output format.
Simple example if you just want to output a regular numerical matrix.
xlswrite('test.xls', rand(3,4));
csvwrite('test.csv',rand(4,5);
  1 Kommentar
Fangjun Jiang
Fangjun Jiang am 6 Nov. 2011
xlswrite() is straightforward. Did you try the above example? If you have numerical data mixed with strings, you can use cell array.
c={'ab',1 4;400,0.4,'akdjf'};
xlswrite('test.xls',c);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by