Afficher commentaires plus anciens
uigetdirで/home/name/Desktop/ANALYSIS/result/IntegratedFilesというパスを取得した際に、IntegratedFilesの文字列をAという変数に入れたい時どうすればよいでしょうか。またその解決方法はwindows,mac,linaxどのOSで実行しても実行できる方法である方が嬉しいです。
Réponse acceptée
Plus de réponses (1)
Atsushi Ueno
le 10 Sep 2021
Modifié(e) : Atsushi Ueno
le 10 Sep 2021
fileparts関数を使います。windows,mac,linuxどのOSで実行しても実行できる方法です。
% selpath = uigetdir % ここでは実行出来ないので省略
selpath = '/home/name/Desktop/ANALYSIS/result/IntegratedFiles.txt';
[filepath,A,ext] = fileparts(selpath)
1 commentaire
takeru misawa
le 13 Sep 2021
Modifié(e) : takeru misawa
le 13 Sep 2021
Catégories
En savoir plus sur ファイルの操作 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!