matlab online how to reference file in folder at same directory
12 views (last 30 days)
Show older comments
Francisco Correia
on 9 Jun 2017
Answered: Francisco Correia
on 9 Jun 2017
Hi,
I'm using Matlab online. In my Matlab drive i have a folder in the same directory that my main.m . The folder is callded "Test2" and inside is a csv file, named 'testeXPTO.csv'. My code in main.m is this:
fid=fopen('../Test2/testeXPTO.csv');
C = textscan(fid, '%s','delimiter', '\n');
The error is:
Error using textscan Invalid file identifier. Use fopen to generate a valid file identifier.
What is the code to relative reference a path of a file that is inside a folder in the same directory that my main.m in Matlab online.
Thanks Your Francisco
2 Comments
Accepted Answer
More Answers (0)
Communities
More Answers in the Distance Learning Community
See Also
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!