matlab online how to reference file in folder at same directory
Afficher commentaires plus anciens
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 commentaires
Please show us both the fid and msg values:
[fid,msg] = fopen('../Test2/testeXPTO.csv')
Francisco Correia
le 9 Juin 2017
Réponse acceptée
Plus de réponses (0)
Communautés
Plus de réponses dans Distance Learning Community
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!