MATLAB Restoring Matlab File After Unwanted Overwriting

  • Thread starter Thread starter Clausius2
  • Start date Start date
  • Tags Tags
    File Matlab
AI Thread Summary
A user expressed frustration after accidentally overwriting a Matlab (.m) file, losing significant work. They sought advice on restoring the file, mentioning that the undo command did not work and inquired about potential recovery options. Other users suggested checking the filesystem type (NTFS or FAT32) and recommended using data recovery programs, emphasizing the importance of not writing new data to the disk to increase recovery chances. There was confusion about whether the file had been reduced to a single character or if it was entirely lost. Ultimately, the user decided to rewrite the program after receiving various suggestions and support from the community.
Clausius2
Science Advisor
Gold Member
Messages
1,433
Reaction score
7
I've written over an existing file in Matlab (.m extension). But I'm stupid because I didn't want to do that.

HOW CAN I RESTORE THE PROGRAM AS WHEN IT WAS BEFORE WRITTING OVER IT?. Is there anyway to restore or to undo this?

Brrr...I'm furious. :mad:

Thanks if you help me.
 
Physics news on Phys.org
I've lost a lot of days work!...

:cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:

:mad: :mad: :mad: :mad: :mad: :mad: :mad:

daskdjlsadjhsilfuishjhjsdhbncbjhblackfffff...sdarrrrrrrrrrrr...

The undo command (the left arrow above) doesn't works...
 
Do you mean you wrote over the file on the disk? Or that you deleted unsaved work from an open file and can't restore it?

Which OS are you using? I've never used Matlab, but depending on the circumstances I might be able to help recover the file.
 
Thanks. After a few time I run the program (Matlab automatically saves the program while running) I did something stupid (I saved it writting over it a single variable in ascii format). Now, when I open the program I saw nothing. Is there any memmory inside the Windows XP that stores the latest datas, although someone had written over it?
 
Is there any memmory inside the Windows XP that stores the latest datas, although someone had written over it?

Now.. which filesystem are you using?

maybe you should try to recover it by using a data-recovery programm...

greets
soeren
 
soeren said:
Now.. which filesystem are you using?

Hi soeren. What do you mean?
 
i mean if you use ntfs or fat32 or something like that..

click right on "C:" and go to the last point (properties or something like that)

there must be something be like:
filesystem is:

and that's interesting.

greets
soeren
 
ah.. one question more:
how big was the file?

and do you have an knoppix-cd?
http://knopper.net/knoppix/index-en.html

soeren

edit:
i think, you have got NTFS (new technology file system :rolleyes: )
which is the standard at windows xp and 2000.

You should try this (i don't know how to recover NTFS -Data with knoppix)
http://www.runtime.org/datarecovery.htm


It's important that you don't boot from the Harddisk you want to recover..
That's the reason why i like it to do this with knoppix...
But MS isn't very cooperative, concerning ntfs and free standards... :frown:

Another tool you should try is this:
http://www.sf-soft.de/winhex/index-m.html
AFAIR you can with that recover data until the size of 200KB.
But I'm not sure.

hope, i helped...

greets
soeren
 
Last edited:
Clausius2 said:
Thanks. After a few time I run the program (Matlab automatically saves the program while running) I did something stupid (I saved it writting over it a single variable in ascii format). Now, when I open the program I saw nothing. Is there any memmory inside the Windows XP that stores the latest datas, although someone had written over it?
I don't quite everything understand yet.

Matlab automatically saves files. OK, that means the file is (or has been) on the disk.

"I saved it writting over it a single variable in ascii format" -- this I don't understand. Are you saying that the contents of the file is now one character? That the name of the file is now one character?

It is not clear from your post whether or not you have a good understanding of computers (so I apologize if the following question is too obvious). Have you, for example, looked in the folder on the hard drive to see if the file is still there?

If what happened is that you saved the file to disk with only one character in the file, I suspect you will need a recovery program like soeren suggests. But if you have been using the same computer for other things since this happened, there is a good chance that the data has been written over.
 
  • #10
heh, last night (long night, ended at 3:30am, got to love engineering) at the end of everything i was using octave (GNU/Matlab :P) and i was piping the results out to a text file, but tired me hit tab (in bash) and piped over my MATLAB file :(
 
  • #11
Thanks Soeren, Plover and Goalie_Ca for your help.

Plover, sorry for my bad explanation. I do not want you to think about me I don't have any idea about computers (by the way I'm not an expert :-p ). Maybe is a problem of language.

Anyway thanks for the help and links, guys. I have chosen a third solution:

Rewrite the program. :cry: (and I almost have written it yet).

Thanks, thanks, thanks...
 

Similar threads

Replies
1
Views
2K
Replies
2
Views
4K
Replies
1
Views
4K
Replies
7
Views
4K
Replies
10
Views
3K
Replies
5
Views
1K
Replies
3
Views
23K
Back
Top