Thread Subject: saving and adding variable from gui to the workspace

Subject: saving and adding variable from gui to the workspace

From: Teodor

Date: 20 Oct, 2009 13:07:02

Message: 1 of 4

Hello!
I have a box that displays all the variables from the workspace and I can take the variable name with a handle function. After a few operations I can generate a vector.
In the end I want to save that vector in the workspace. The final saved VARIABLE from the workspace should be with the NAME of the variable chosen (with the handle function) and with the VALUE of the generated vector.
I don't know how to do it. Can you help me with this problem?
In this moment I know only how to save the generated vector into the workspace using:
save matlab result_vector -APPEND;
And in the workspace I get the Name of the variable:"result_vector"...

Subject: saving and adding variable from gui to the workspace

From: ImageAnalyst

Date: 20 Oct, 2009 13:53:45

Message: 2 of 4

On Oct 20, 9:07 am, "Teodor " <teodoralexan...@yahoo.com> wrote:
> Hello!
> I have a box that displays all the variables from the workspace and I can take the variable name with a handle function. After a few operations I can generate a vector.
> In the end I want to save that vector in the workspace. The final saved VARIABLE from the workspace should be with the NAME of the variable chosen (with the handle function) and with the VALUE of the generated vector.
> I don't know how to do it. Can you help me with this problem?
> In this moment I know only how to save the generated vector  into the workspace using:
> save matlab result_vector -APPEND;
> And in the workspace I get the Name of the variable:"result_vector"...

---------------------------------------------------------------------------------------------------------------
I believe you're talking about the "base" workspace. But regardless,
I believe you want the assignin() function, which can stuff your
variable into any workspace.

Subject: saving and adding variable from gui to the workspace

From: Matt Fig

Date: 20 Oct, 2009 14:09:01

Message: 3 of 4

In answering question #30, I show a safe way to do what you want to do.

http://www.mathworks.com/matlabcentral/fileexchange/24861-35-complete-gui-examples

Subject: saving and adding variable from gui to the workspace

From: Teodor

Date: 21 Oct, 2009 06:30:45

Message: 4 of 4

"Matt Fig" <spamanon@yahoo.com> wrote in message <hbkg9t$j58$1@fred.mathworks.com>...
> In answering question #30, I show a safe way to do what you want to do.
>
> http://www.mathworks.com/matlabcentral/fileexchange/24861-35-complete-gui-examples


Thank you very much! It is just what I needed!

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com