I am recent purchaser of student version R2017b. Getting error in using fgetl(shown below). Opened the input file (rinex observation data) using fopen. Using fgets makes my code failed as I am working with the length of strings.Kindly help.

2 ビュー (過去 30 日間)
Too many output arguments.
Error in fgetl (line 32)
[tline,lt] = fgetl(fid);
Error in readrinex (line 15)
line = fgetl(fid);
while ~feof(fid)
line = fgetl(fid);
if length(line)>33&&line(33)=='G',xx=line;
ns=str2double(xx(31:32));
for j=1:ns,
fprintf(fwr,'%d/%d/%d, %d:%d:%d, %s, ', str2double(xx(2:3)));
line1 = fgetl(fid);ll1=length(line1);
if ll1<1
for i=1:5,
fprintf(fwr,' NaN,\t');
end;
else
for i=1:16:ll1,
if i+14>ll1 && ll1==78, fprintf(fwr,'%s,\t',line1(i:end));
elseif line1(i:i+14)==' ',
fprintf(fwr,' NaN,\t');
else
fprintf(fwr,'%s,\t',line1(i:i+14));
end;
end;
end;

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 1 月 22 日
What shows up for
which -all fgetl
The first entry should be under toolbox/matlab/iofun/fgetl.m and on line 32 of that file there is a call to fgets rather than to fgetl -- a call to fgetl from within fgetl would be recursion if it worked at all.
  1 件のコメント
Lakshmi Chodavarapu
Lakshmi Chodavarapu 2018 年 1 月 30 日
Hi, I could solve this problem by only re-installing the licensed version. Thanks!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by