|
|
how to automatically create "smart" files names
Hi,
I would like Matlab to save data in a file whose name would contains some of the simulations parameters
For instance, let's say I run simulations at various temperaturesT and pressures P,
Can MAtlab automatically save the data in files whose name would be T_ 20_P_1 ,T_ 40_P_1, T_ 60_P_1....
So far to save my data I use:
save file_name result1 result2 and change the file_name everytime I run my code..
Quite tedious
Thanks for your help
|
|
0
|
|
|
|
Reply
|
Marlene
|
5/19/2010 8:47:04 AM |
|
>
> For instance, let's say I run simulations at various temperaturesT and pressures P,
> Can MAtlab automatically save the data in files whose name would be T_ 20_P_1 ,T_ 40_P_1, T_ 60_P_1....
Try to construct string like:
myfile=['data_T',num2str(t),'_P',num2str(p)];
save myfile
|
|
0
|
|
|
|
Reply
|
Jean
|
5/19/2010 9:58:03 AM
|
|
"Marlene Ferrier" <marlene.ferrier@gmail.com> wrote in message <ht08i8$q9l$1@fred.mathworks.com>...
> Hi,
>
> I would like Matlab to save data in a file whose name would contains some of the simulations parameters
>
> For instance, let's say I run simulations at various temperaturesT and pressures P,
> Can MAtlab automatically save the data in files whose name would be T_ 20_P_1 ,T_ 40_P_1, T_ 60_P_1....
>
> So far to save my data I use:
> save file_name result1 result2 and change the file_name everytime I run my code..
>
> Quite tedious
>
> Thanks for your help
a hint:
- to create file names
help sprintf;
http://matlabwiki.mathworks.com/MATLAB_FAQ#How_can_I_process_a_sequence_of_files.3F
- to save them
save(fnam,'...',...);
http://matlabwiki.mathworks.com/MATLAB_FAQ#How_do_I_dynamically_generate_a_filename_for_SAVE.3F
us
|
|
0
|
|
|
|
Reply
|
us
|
5/19/2010 10:05:05 AM
|
|
|
2 Replies
307 Views
(page loaded in 0.024 seconds)
Similiar Articles: Create staple diagrams from a text file (containing numbers) from ...Hi, From the command line, is it possible to somehow automatically create a staple diagram from a file ... containing the file name, the spooled number, and the job name ... Automatically creating dimenions on Slddrw - comp.cad.solidworks ...Hi there, I was wondering if anyone knew how to automatically create ... AUTOMATIC PART DESCRIPTION TRANSFER TO DRAWING FILE NAME - comp ... Part numbers automatically ... Inserting File Name in the Header / Footer - comp.text.pdf ...Hi Rick, If you are looking to create PDFs automatically and then place the original document's file name somewhere on the PDF, we are working on a way to do that ... List image file names in a field and creating photo viewer - comp ...In the house numebr table, this should be an automatically generated serial number ... List image file names in a field and creating photo viewer - comp ... Insert ... Printing to PDF automatically saves document - comp.text.pdf ...However, at the same time, a copy of the document is automatically saved in the folder that the printer port was created in and has a name similar to the file from which ... change 'file name' in 'From Multimedia File' simulink block - comp ...Is that possible to send these path name and filename automatically to the 'file name' in 'From Multimedia File' block when the avi file is loaded? File Name for each iteration in for-loop - comp.soft-sys.matlab ...File Name for each iteration in for-loop - comp.soft-sys.matlab ... changing the variable name in a FOR loop - comp.soft-sys.matlab ... File Name for each iteration in for ... Need help. How to create a list with multiple occurences of a ...You need to create a new file called "Flavours", with fields ... can leave the Spreadsheet open and it can automatically ... List image file names in a field and creating photo ... How to save files into a specific folder - comp.soft-sys.matlab ...Note how I create a new subfolder based on the name of the input movie file. ... up with a "separate folder" (like you asked) automatically ... Make sendmail read the SMART_HOST from a file - comp.unix ...Sendmail SMTP Host Name - comp.unix.solaris Make sendmail read the SMART_HOST from a file - comp.unix ... Sendmail SMTP Host Name - comp.unix.solaris I read about a ... Video: How to Create Smart Playlists in iTunes | eHow.com... for playlists and automatically add songs to that playlist; learn how to create smart ... You go to 'File', 'New Smart Playlist' and ... Name' which is the song name ... iTunes: How to create a Smart Playlist - Apple - SupportLearn how to automatically create a playlist ... Choose File > New Smart Playlist. To have ... To create your Smart Playlist, click OK, then name the playlist ... 7/27/2012 6:53:58 PM
|
|
|
|
|
|
|
|
|