You are opening the file in write mode inside a for loop. So everytime the file gets overwritten.thanks
fprintf: Function is not defined for... Learn more about function is not defined for 'cell' inputs., fprintf, cell array, textscan MATLAB
In my case I have a function inside which I use fprint to build a "report". So when I call this function apart from the computational part it also makes report that is printed in the command window. If find it useful if I can reclaim the printed results a...
Now it seems the automatic flushing does work. Maybe there was something weird going on with the file system I was working on or something else strange like that.