I think, MATLAB faced Low memory problem because by closing software and starting again MATLAB can continue to remain iterations. Therfore I need to a function to increase MATLAB memory. The "clear all" is not useful.

@Mohsen: Flags are used to inform the admins and editors about a message, which should be deleted or edited because it conflicts with the forum rules. Therefore I've deleted your flag "Regards, your guide is useful".

@Mohsen: Now you have flagged my comment. Does this mean, that you want the admins and other editors to check, if my comment violates the forum rules? Although the message of your flag "Thanks a lot" seems to imply, that you do not want my comment to be deleted due to rude or inappropriate contents, I hesitate to delete a flag of my own posting.

Please use comments to post comments, and not flags.

@Admins/editors: Please remove this flag. Sorry for being nitpicking, but I think that editors should not clean up flags for their own postings. Thanks.

The best method to increase memory is installing more RAM and using a 64 bit version of Matlab.

But in your case the error message is unequivocally an invalid file identifier. This is a completely other problem and not related to memory. It means that you have tried to open a not existing file. This should be checked in every case: