But even then, you just get exifdata as a 1xn char array, you you still have to decipher that into meaningfull variables. (I've done so for myself, and it works, but it's not mature enough to post it on FileExchange).
I suppose nf should reurn the number of fields in the exif data, but counting the ':' is not the right way to do it.
20 Jun 2013
Read and write full Exif metadata from image files. A Matlab front end for ExifTool, by Phil Harvey.
Author: Peter Burns
Sounds like just what I need, but is not working on my syetem (R2007b).
I get: "'exiftool.exe' is not recognized as an internal or external command,
operable program or batch file."
Even though exiftool.exe is in my path (confirmed by 'whcih exiftool.exe')
I (= Jeroen) am just a user of this sun_position function, perhaps your question is meant for Vincent Roy (=author of sun_position).
Still, I'd be glad to help if I can.
Can you post the code that generates your error message ?