필터 지우기
필터 지우기

xlsread and MATLAB engine timing

조회 수: 1 (최근 30일)
Caroline
Caroline 2013년 7월 30일
I am using the MATLAB engine to access the function xlsread through C++. The C++ script calls xlsread multiple times to read various columns of different sheets of the same excel document. And while it works correctly, running it takes a while (about 2 minutes). Does anyone know of a faster way to do this?
Thanks!

답변 (1개)

Kevin
Kevin 2013년 7월 30일
Hey Caroline,
Do you ever access the same sheet on two separate occasions? If so I'd save the sheet as a variable to prevent xlsread from being called again. It seems to be an expensive operation to me.
KD
  댓글 수: 1
Caroline
Caroline 2013년 7월 30일
Hi Kevin,
Thanks so much for answering me! I'm not sure I understand what you mean by save that sheet as a variable. To clarify, do you mean read in the whole sheet at once, as opposed to reading separate columns at different times, and save the cell array that it returns as a variable?
Thanks again!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by