Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: uigetfile fullfile and mkdir
Date: Wed, 3 Dec 2008 09:10:22 +0000 (UTC)
Organization: PhysioSonics Inc
Lines: 20
Message-ID: <gh5idu$bmn$1@fred.mathworks.com>
References: <gh5hr3$12c$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228295422 11991 172.30.248.35 (3 Dec 2008 09:10:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 3 Dec 2008 09:10:22 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1129061
Xref: news.mathworks.com comp.soft-sys.matlab:504616


"onur alptekin" <onur_alptekin@hotmail.com> wrote in message <gh5hr3$12c$1@fred.mathworks.com>...
> hello;
> i'm trying to generate a folder using uigetfile by gui. ui get file saves inputs in cell arrays. 
> I want to generate a folder in the name of input data.
> for example ; 
> data(1)='12345'; % saved as cell because of the uigetfile function
> f1=fullfile('C:', 'Program Files', 'MATLAB','R2008A,'work',data(1));
> %last pathname(data(1)) should be 12345 by the input
> 
> if(exist(f1)==0)
>    makedir(f1);
> end
> 

Try:

data{1}='12345'; 
f1=fullfile('C:', 'Program Files', 'MATLAB','R2008A,'work',data{1});

Cell arrays need to be assigned / referenced with curly brackets.