How to remove file extension when using ugetfile in app designer?
조회 수: 97 (최근 30일)
이전 댓글 표시
Hi All
I use
[filename,pathname] = uigetfile('*.xlsx');% add ur extension post period within parathesis.
fullfilename = fullfile(pathname,filename);
A = xlsread(fullfilename); % if it is a excel file. else use whatever it is.
but then I need to use the filename but without its extension, how do I do that in app designer
댓글 수: 0
채택된 답변
Rik
2020년 11월 18일
The easiest way to remove an extension is with fileparts:
[p,f,e]=fileparts(fullfilename);
fullfilename=fullfile(p,f);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!