file io - How to load data in MATLAB from current script folder? -


there script myscript.m, under d:\myprojects, location d:\myprojects\myscript.m

i want load .dat file @ d:\myprojects\mydata\somedata.dat

how use load() function without using absolute path like

data = load('d:\myprojects\mydata\somedata.dat')   % not want 

data = load('mydata\somedata.dat')    

use relative path. assumes executing program it's home directory d:\myprojects.

if need call script different folders should pass path .dat argument script.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -