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: Ganesh Kini
Subject: Re: Error while opening a .txt file
Date: Sun, 7 Jun 2020 11:55:08 +0200

  Sorry i kept the file in the wrong directory. It works fine now 

On Sun, Jun 7, 2020 at 11:43 AM Markus Mützel <markus.muetzel@gmx.de> wrote:
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 = "" (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 = "" (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]