Problem reading an excel csp file using Matlab
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Matt Tearle
le 18 Fév 2014
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 commentaires
Voir également
Catégories
En savoir plus sur Other Formats dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!