Restoring Matlab File After Unwanted Overwriting

  • MATLAB
  • Thread starter Clausius2
  • Start date
  • Tags
    File Matlab
In summary, the person lost a lot of work because they deleted unsaved work from an open file and then wrote over it. They are angry because they cannot restore the file. They are using Windows XP and the undo command does not work. They are using a filesystem and it is important that they don't boot from the hard drive they want to recover. They have tried two other data recovery tools and neither worked. They have chosen a third solution.
  • #1
Clausius2
Science Advisor
Gold Member
1,440
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
  • #2
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...
 
  • #3
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.
 
  • #4
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?
 
  • #5
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
 
  • #6
soeren said:
Now.. which filesystem are you using?

Hi soeren. What do you mean?
 
  • #7
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
 
  • #8
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:
  • #9
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...
 

Related to Restoring Matlab File After Unwanted Overwriting

1. How can I restore a Matlab file after accidentally overwriting it?

Restoring a Matlab file after unwanted overwriting can be done by using the "History" feature in Matlab. This feature keeps track of all the changes made to a file and allows you to revert back to a previous version.

2. Can I recover a Matlab file that has been overwritten and saved?

Yes, it is possible to recover a Matlab file that has been overwritten and saved. You can do this by using a file recovery software or by restoring a previous version of the file using the "History" feature in Matlab.

3. Is there a way to prevent accidental overwriting of Matlab files?

Yes, you can prevent accidental overwriting of Matlab files by enabling the "Read only" option for the file. This will prompt you to make a copy of the file before making any changes, thus preventing accidental overwriting.

4. Can I undo changes made to a Matlab file without losing all my work?

Yes, you can undo changes made to a Matlab file without losing all your work by using the "Undo" feature in Matlab. This allows you to go back to a previous state of the file without losing any unsaved work.

5. What should I do if I have accidentally overwritten a critical Matlab file?

If you have accidentally overwritten a critical Matlab file, you can try to restore it using the "History" feature or a file recovery software. If these options do not work, you can try reaching out to Matlab support for further assistance.

Similar threads

  • Programming and Computer Science
2
Replies
50
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
3K
Replies
1
Views
1K
  • Computing and Technology
Replies
22
Views
2K
Back
Top