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!