Problem reading an excel csp file using Matlab
조회 수: 1 (최근 30일)
이전 댓글 표시
Please help ! I wrote a matlab code to compute Position Velocity and Time in GPS but we have problem reading our data in the Excel CSP file ..
This is my code:
function eph = get_eph(ephemeridesfile) %GET_EPH The ephemerides contained in ephemeridesfile % are reshaped into a matrix with 21 rows and % as many columns as there are ephemerides.
% Typical call eph = get_eph('rinex_n.dat')
%Kai Borre 10-10-96 %Copyright (c) by Kai Borre %$Revision: 1.0 $ $Date: 1997/09/26 $
fide = fopen(ephemeridesfile); [eph, count] = fread(fide, Inf, 'double'); noeph = count/21; eph = reshape(eph, 21, noeph);
This is my error:
Error using fread Invalid file identifier. Use fopen to generate a valid file identifier.
Error in get_eph (line 13) [eph, count] = fread(fide, Inf, 'double');
Error in loadingscript (line 14) eph = get_eph(ephemeridesfile);
댓글 수: 0
답변 (1개)
Matt Tearle
2014년 2월 18일
The error message is indicating a problem with opening the file. The file identifier returned by fopen does not refer to a valid, open file. That would generally indicated that the file doesn't exist or is corrupted. For example:
>> fid = fopen('nosuchfile.xyz')
fid =
-1
>> fread(fid)
Error using fread
Invalid file identifier. Use fopen to generate a valid file identifier.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!