Forum: Answers and discussion

Monitor Forum | Start New Thread Start New Thread
Re: Help to recover my script (function and command) [ Reply ]
By: Sadeghi on 2017-11-11 01:52
[forum:879]

Dear Guillaume,

Thanks alot for your reply. Yes unfortunately it has been lost, but I have started to write again. Actually I was looking for a way to connect (load) my results (acceleration) to Wavelet apps, and I tried different commands and procedure. Even I do not know how can I solve this issue. To be clear, after running the model I have results such as acc, disp and velo, I am goining to export from sdtool box to apps. I would be greatful if you hint me the way.

Regards,

Faraz


Re: Help to recover my script (function and command) [ Reply ]
By: Guillaume Vermot des Roches on 2017-11-10 06:19
[forum:878]

I am afraid you performed an overwrite operation by directly asking feutilb to replace your script with an m file that generates the model, as it is documented. There is no way of recovering your file like for usual erase/overwrite operations.

If you had matlab in auto-save mode and did not do any modification to the overwritten m file, you may check in the same directory for TestA.m~ or TestA.asv that might not have been updated yet.

Besides the unfortunate code loss, the question is what did you intend to do ? feutilb('write') is a very specific command that is very different from model saving commands.

Kind Regards,


Re: Help to recover my script (function and command) [ Reply ]
By: Sadeghi on 2017-11-10 00:00
[forum:877]

let me explain again, I wrote a code in Editor window (Matlab SDtool) and several times run the program, and my file is saved as Filename.m (my saved file name is TestA.m)

But unfortunately I wrote a function and command name as feutilb(’WriteFileName.m’,model) in command window  and replace my file name (TestA.m) and my model name (modelf) in this function. It changed (actually re-wrote) my code to just number (like matrix) and now I can not see my code (as function and command) in my saved file.

My question is how can I restore my script (as function and command)? as I need to see my code (script) as function and command. It was more than 100 line and I do not have backup of my script. Because actually it has been re-wrote and changed.

Please find the file in your email.

Regards,

Faraz


Re: Help to recover my script (function and command) [ Reply ]
By: Balmes on 2017-11-09 11:03
[forum:876]

I am not sur I understand. You are trying to import test results ? or save a FEM model ?

feutilb('write') is used to display a clear text version of a FEM model, but in general people will more simple save the model data structure to a .mat file.


Help to recover my script (function and command) [ Reply ]
By: Sadeghi on 2017-11-09 04:36
[forum:875]

I wrote a code about 100 line in Editor box (script) in Matlab (SDtools), and tried to connect Matlab app to analysis my result (acceleration). I already saved and run several times. Unfortunately when I tried randomly different commands to understand how to import my data to the app, based on the Manual I try this command [[ feutilb('writefilename.m',model) ]] and all my script changed to number like matrix and now I can not go back/undo previous condition.

Please let me know how con I recover my script like function and command as I wrote. Thanks