Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
help with making a folder and saving files

Subject: help with making a folder and saving files

From: si yeol Shin

Date: 2 Feb, 2011 06:02:03

Message: 1 of 5

hellow~ guys
i got a problem that is about saving files in specific folder.
i want to make a folder and the name of the folder could be one of myfiles what i used
for calculating.
------------------------------------------------------------------------
[outmax_file,outmax_path] = uigetfile('*.txt','Select Data to Open','C:\Program Files\Geo-information\Reliability\input_copied\');
outmax_user_input_data = fullfile(outmax_path,outmax_file);
:
:
mkdir('C:\Program Files\Geo-information\Reliability\modified_pro',outmax_file) ;
------------------------------------------------------------------------

i can make a folder from above code
the full path of the folder is
''C:\Program Files\Geo-information\Reliability\modified_pro/1.txt"
(notice that the 1.txt is not a file but a name of the folder.it is not important thing)
and i want to save some txt files in that folder.

how do i make the code using "save"

i don't know well how the savepath would be coded with the variable "outmax_file"

Subject: help with making a folder and saving files

From: Think blue, count two.

Date: 2 Feb, 2011 06:10:18

Message: 2 of 5

On 02/02/11 12:02 AM, si yeol Shin wrote:

> i got a problem that is about saving files in specific folder.
> i want to make a folder and the name of the folder could be one of
> myfiles what i used
> for calculating.

That is not possible. You cannot have a pathname that is both a file
name and a directory.

> ------------------------------------------------------------------------
> [outmax_file,outmax_path] = uigetfile('*.txt','Select Data to
> Open','C:\Program Files\Geo-information\Reliability\input_copied\');
> outmax_user_input_data = fullfile(outmax_path,outmax_file);
> :
> :
> mkdir('C:\Program
> Files\Geo-information\Reliability\modified_pro',outmax_file) ;

Why not use

mkdir(outmax_user_input_data)

Subject: help with making a folder and saving files

From: si yeol Shin

Date: 2 Feb, 2011 06:32:03

Message: 3 of 5

 ㅡ 0 ㅡ ;
it's so~~~~ easy....
that is the answer what i want.
i didn't know that.
thank you~^^;

Subject: help with making a folder and saving files

From: si yeol Shin

Date: 2 Feb, 2011 06:51:03

Message: 4 of 5

and

how can i code the savepath using 'save' and 'outmax_user_input_data'to save some data in that folder.

outmax_make_new_matrix_for_Mdproout95(outmax_make_new_matrix_for_Mdproout95>=outmax_confidenceLevel3) = 0;

save 'C:\Program Files\Geo-information\Reliability\modified_pro\95%.txt' outmax_make_new_matrix_for_Mdproout95 /ascii;


i have to replace this part of above code " 'C:\Program Files\Geo-information\Reliability\modified_pro\95%.txt' " to 'outmax_user_input_data'
but it doesn't work. what is wrong with my code?

Subject: help with making a folder and saving files

From: si yeol Shin

Date: 2 Feb, 2011 07:50:04

Message: 5 of 5

oh~ i'm sorry~
i was a little bit confused with your comment.
i will explain simply the process of the code again.

you told me use "outmax_user_input_data".
but unfortunately it is not.
------------------------------------------------------------------------
[outmax_file,outmax_path] = uigetfile('*.txt','Select Data to Open','C:\Program Files\Geo-information\Reliability\input_copied\');
outmax_user_input_data = fullfile(outmax_path,outmax_file);
:
:
mkdir('C:\Program Files\Geo-information\Reliability\modified_pro',outmax_file) ;
------------------------------------------------------------------------
i will make a new folder and the new folder name could be named by "outmax_file"
so i put it in mkdir function .

and i want to save some data in that new folder.
in this part i feel difficulty in coding to save some data.
i confuse that how to code the part for saving path.

the order of save function is
save filename variable -ascii

can anybody help me about it plz?

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us