I AM A FRESH LEARNER OF MATLAB AND TRYING TO GET ALONG WITH FILES.MY PROBLEMS LIES IN THAT THE FILE IS CREATED IN CURRENT DIRECTORY BUT WHEN I OPEN THE FILE AFTER EXECUTION OF PROGRAM IT SHOWS NO DATA.ANY HELP WILL BE APPRECIATED.
FOLLOWING IS A SIMPLE PROGRAM I WAS TRYING!
a=input('\nvalue of a: ')
b=input('\nvalue of b: ')
fprintf('\nvalue of c=%f \n',c)
fprintf('\nvalue of d=%f \n',d)
FID stands for FileID and is usually an integer. I always have imagined it like a sort of a 'stream' or a 'channel'. If You open a file either for reading of for writing, it is done thru a 'stream' with a unique ID (==FID). You open a channel, you transfer data, you close a channel...
if You'd try help fclose in console, You would find out that this particular function returns 0 if closing a 'channel' with an ID of FID is successful, but it returns -1 if it's unsuccessful.
Also, FCLOSE('all') closes all open files, except 0, 1 and 2. I guess they are reserved.