Trouble loading .bin file

Hi,
I'm having trouble importing a .bin file on an FTP server. Below is the code. Any thoughts on why fopen is returning -1??
FULLurl = 'ftp://disc2.nascom.nasa.gov/data/TRMM/Gridded/Derived_Products/3B42RT/Daily/2001/3B42RT_daily.2001.03.01.bin';
fid = fopen(FULLurl, 'r');
a = fread(fid, 'float','b');
fclose(fid);

Respuestas (1)

Guillaume
Guillaume el 21 de Feb. de 2015

1 voto

Any thoughts on why fopen is returning -1?
That would because fopen is only for accessing the filesystem. It does not work over ftp (or http for that matter).
For ftp access, use the ftp class.

3 comentarios

Ryan Oates
Ryan Oates el 21 de Feb. de 2015
Thanks Guillaume!
Also, even when I download a file onto my local drive, fread doesn't seem to work either. Am I THAT off??
Image Analyst
Image Analyst el 21 de Feb. de 2015
Attach the file, and attach your m-file script that demonstrates the problem.
Guillaume
Guillaume el 22 de Feb. de 2015
Well, your syntax for fread looks a bit off. Possibly, you mean:
a = fread(fid, Inf, 'float', 0, 'b');

Iniciar sesión para comentar.

Categorías

Más información sobre Large Files and Big Data en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 21 de Feb. de 2015

Comentada:

el 22 de Feb. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by