Data Import/export from figure Matlab GUI
7 views (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
Fangjun Jiang
on 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 Comment
Fangjun Jiang
on 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);
More Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!