Importing Data from Excel File 'Faster' ??
Mostrar comentarios más antiguos
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 comentarios
Seth DeLand
el 2 de Mzo. de 2011
Hi Mohamed,
Do you know what's taking up the most time in your callback (importing the data, or looping through the matrix)? You could run the profiler on your code to investigate.
Mohamed Alaa
el 3 de Mzo. de 2011
Oleg Komarov
el 3 de Mzo. de 2011
Nothing you could do about the searching and yet you're using loops is already contradiction. You can post the loops with example input and we can try to make it faster other than optimizing the I/O operations.
Mohamed Alaa
el 3 de Mzo. de 2011
Oleg Komarov
el 3 de Mzo. de 2011
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!