Unexpected MATLAB operator when using fully qualified path name
Show older comments
I'd like to specify a fully qualified path name as input to Matlab on Linux, but it doesn't seem to accept it. The file is
% cat hw.m
msg='hello, world'
From the Matlab prompt, anything other than the basename causes an error. Is there a way to make this work?
>> /home/matlab/hw
/home/matlab/hw
|
Error: Unexpected MATLAB operator.
>> ~/matlab/hw
~/matlab/hw
|
Error: Unexpected MATLAB operator.
>> ./hw
./hw
|
Error: Unexpected MATLAB operator.
>> hw
msg =
hello, world
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!