From: su su on
Hi all,
I am completely over because of my GUi, I prepared a Gui for my thesis which includes several evaulation. First, it starts with load (*.grd) data and after the function save it (.mat) data. But I didnt solve how can I call the file again for the later applications in the same gui with no changing in coding (file of data.mat), ın my code I call the data file by a fixed name (as written in the gui .m file_such as, in coding gui, I use (mate.grd) and then again in coding I call it with the same name for using somewhere in code). How can I convert the files as 'default' name and how can I change the names before using them later evaulations?
I am really so disapponted and I really have any idea how can I fix this problem.
Thanks in advance
Nora
From: us on
"su su" <nursutun(a)yahoo.com> wrote in message <hohkc3$nrd$1(a)fred.mathworks.com>...
> Hi all,
> I am completely over because of my GUi, I prepared a Gui for my thesis which includes several evaulation. First, it starts with load (*.grd) data and after the function save it (.mat) data. But I didnt solve how can I call the file again for the later applications in the same gui with no changing in coding (file of data.mat), &#305;n my code I call the data file by a fixed name (as written in the gui .m file_such as, in coding gui, I use (mate.grd) and then again in coding I call it with the same name for using somewhere in code). How can I convert the files as 'default' name and how can I change the names before using them later evaulations?
> I am really so disapponted and I really have any idea how can I fix this problem.
> Thanks in advance
> Nora

sorry, but the description of your problem is simply too confusing...
can you try, again...

us
From: Nora Sun on
"us " <us(a)neurol.unizh.ch> wrote in message <hohl1t$4d0$1(a)fred.mathworks.com>...
> "su su" <nursutun(a)yahoo.com> wrote in message <hohkc3$nrd$1(a)fred.mathworks.com>...
> > Hi all,
> > I am completely over because of my GUi, I prepared a Gui for my thesis which includes several evaulation. First, it starts with load (*.grd) data and after the function save it (.mat) data. But I didnt solve how can I call the file again for the later applications in the same gui with no changing in coding (file of data.mat), &#305;n my code I call the data file by a fixed name (as written in the gui .m file_such as, in coding gui, I use (mate.grd) and then again in coding I call it with the same name for using somewhere in code). How can I convert the files as 'default' name and how can I change the names before using them later evaulations?
> > I am really so disapponted and I really have any idea how can I fix this problem.
> > Thanks in advance
> > Nora
>
> sorry, but the description of your problem is simply too confusing...
> can you try, again...
>
> us

Sorry for the description, I am really so confused. I try to write a code for my program in GUi. And the functions I used in this Gui work when I call the output data with a certain name (without any selection from the open file command) while the output data is in the same directory. ( such as, in coding I used the (data.grd) for evaluations and this file is in the current directory, and in coding, I save the evaluated form of this data as (data.mat)). But I want to use this selections done from user, not automatically what I wrote in the code for name. Basically, I try to convert my code user friendly, thus, the user select the data and save it whatever he wants, and after another selection find this saved file again.
I hope I can explain it right,
Thanks for your posting
Nora
From: us on
"Nora Sun" <nursutun(a)yahoo.com> wrote in message <hohlu3$get$1(a)fred.mathworks.com>...
> "us " <us(a)neurol.unizh.ch> wrote in message <hohl1t$4d0$1(a)fred.mathworks.com>...
> > "su su" <nursutun(a)yahoo.com> wrote in message <hohkc3$nrd$1(a)fred.mathworks.com>...
> > > Hi all,
> > > I am completely over because of my GUi, I prepared a Gui for my thesis which includes several evaulation. First, it starts with load (*.grd) data and after the function save it (.mat) data. But I didnt solve how can I call the file again for the later applications in the same gui with no changing in coding (file of data.mat), &#305;n my code I call the data file by a fixed name (as written in the gui .m file_such as, in coding gui, I use (mate.grd) and then again in coding I call it with the same name for using somewhere in code). How can I convert the files as 'default' name and how can I change the names before using them later evaulations?
> > > I am really so disapponted and I really have any idea how can I fix this problem.
> > > Thanks in advance
> > > Nora
> >
> > sorry, but the description of your problem is simply too confusing...
> > can you try, again...
> >
> > us
>
> Sorry for the description, I am really so confused. I try to write a code for my program in GUi. And the functions I used in this Gui work when I call the output data with a certain name (without any selection from the open file command) while the output data is in the same directory. ( such as, in coding I used the (data.grd) for evaluations and this file is in the current directory, and in coding, I save the evaluated form of this data as (data.mat)). But I want to use this selections done from user, not automatically what I wrote in the code for name. Basically, I try to convert my code user friendly, thus, the user select the data and save it whatever he wants, and after another selection find this saved file again.
> I hope I can explain it right,
> Thanks for your posting
> Nora

hmm... if(f) by ...the user select the data... you mean: the file name(?), then

% this might be your friend...
help uigetfile;

us
From: Bruno Luong on
"su su" <nursutun(a)yahoo.com> wrote in message <hohkc3$nrd$1(a)fred.mathworks.com>...
> Hi all,
> I am completely over because of my GUi, I prepared a Gui for my thesis which includes several evaulation. First, it starts with load (*.grd) data and after the function save it (.mat) data. But I didnt solve how can I call the file again for the later applications in the same gui with no changing in coding (file of data.mat), &#305;n my code I call the data file by a fixed name (as written in the gui .m file_such as, in coding gui, I use (mate.grd) and then again in coding I call it with the same name for using somewhere in code). How can I convert the files as 'default' name and how can I change the names before using them later evaulations?
> I am really so disapponted and I really have any idea how can I fix this problem.
> Thanks in advance
> Nora

Don't hardcode the file name, put in string variable

filename = 'data.grd'
data = load(filename)

data = ...
filename ='data.mat'
save(filename, 'data');

Bruno