Problem reading an excel csp file using Matlab
2 次查看(过去 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!