Entering file directory as an input

3 ビュー (過去 30 日間)
Ugur Halden
Ugur Halden 2017 年 10 月 17 日
回答済み: KSSV 2017 年 10 月 17 日
Hello everyone,
I am having a problem with a function which my prof wrote. The function reads pressure files (pressure1.dat, pressure2.dat for example) but i need to enter the file directory which pressures are located as an input to function. For example:
MyFunction(A,B,folder)
The folder here should be the where the files are saved.
How can i accomplish this in Matlab?
Thanks in advance for all the help!

回答 (1 件)

KSSV
KSSV 2017 年 10 月 17 日
Multiple options:
1. You can use uigetfile to browse to the location via mouse.
2. Give the input of file with path.
3. Add this file into matlab's path, so that you can call any where..and then call this function in the folder where file is present.

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by