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
Post a Comment