Accessing Path names for reading Excel and saving .mat files in same folder
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
I have Excel data files in a number of folders under the MATLAB folder (all on the MATLAB path). To speed up analysis, I would like to only read the Excel file once, and then save the variables in a .mat file *in the same folder *as the original Excel file.
How do you get the actual path name for the Excel file without having to manually input it so it can be prepended to the .mat file name?
Thanks
Doug
댓글 수: 0
채택된 답변
Walter Roberson
2012년 10월 23일
Together with:
idx = find(TheFilename == '.', 1, 'last');
NewFilename = TheFilename;
NewFilename(idx:end) = '.mat';
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!