Data Import/export from figure Matlab GUI

4 次查看(过去 30 天)
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

采纳的回答

Fangjun Jiang
Fangjun Jiang 2011-11-5
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 个评论
Fangjun Jiang
Fangjun Jiang 2011-11-6
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);

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by