help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error while opening a .txt file


From: Markus Mützel
Subject: Re: Error while opening a .txt file
Date: Sun, 7 Jun 2020 11:43:53 +0200

Am 07. Juni 2020 um 11:36 Uhr schrieb "Ganesh Kini":
> Hi i was trying to run this code for the first time
> 
> fid = fopen ('data.txt');
> data = textscan (fid, '% f', 'HeaderLines', 5);
> period_arr = data {1};
> fclose (fid);
> 
> error
> >> test
> Error using textscan
> Invalid file identifier. Use fopen to generate a valid file identifier.
> 
> Error in test (line 2)
> data = textscan (fid, '% f', 'HeaderLines', 5);
> 
>
> Please help me
>

Did you try querying the message returned by "fopen"?
[fid, msg] = fopen ('data.txt')

What does it say?

Markus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]