I have the code below but when I run, I get a textscan error. I am not sure what else I can try....I know that my text file is in my current MATLAB folder so the path should be okay...
ExPath = [pwd,'/watershed.txt'];
fid=fopen(ExPath)
data = textscan(fid,'%d %d %d %f %f %f %f %f', 'headerlines',1);
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.

Respuestas (1)

Star Strider
Star Strider el 28 de Abr. de 2021

0 votos

Use the fullfile function to build the complete path.

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 27 de Abr. de 2021

Respondida:

el 28 de Abr. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by