Importing Data from Excel File 'Faster' ??
4 次查看(过去 30 天)
显示 更早的评论
Actually I'm working now on a GUI it's supposed that i have data (Matrix 2D of strings) like that :
A={'hello' 'world' 'hi';'my' 'name' is'};
it's simple,but I've put it in excel file and in the GUI m-file I've made a callback function that import that data from that file and save to a matrix and do some for loops to search for something inside this data . and finally saving the matrix back into the file .
THAT'S ACTUALLY CONSUMING TIME AND MY PROGRAM IS SLOW
Is there is a way to make it faster ? , Or any other solution ?
Thanks in Advance !
5 个评论
Oleg Komarov
2011-3-3
I would:
- try to eliminate _importdata_
- definitely concentrate on the loops: no preallocation and regexp can also operate on cell arrays.
Try to post another thread with a meaningful example of the type of excel you usually have and more code.
采纳的回答
Oleg Komarov
2011-3-2
Oleg
2 个评论
Matt Tearle
2011-3-2
Also note that xlsread/write are editable MATLAB code... meaning you can open them up, see how they work and copy bits and pieces. Hence, you can strip them down to the barest basics you need.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!