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:
Attribuate a value from edit1 of form1 to edit1 of form2

Subject: Attribuate a value from edit1 of form1 to edit1 of form2

From: Sprinceana

Date: 15 Mar, 2009 14:56:01

Message: 1 of 2

How can I attribuate a value stored in edit1 of a form(edit1.fig) to another edit1 of the second form(edit2.fig).

Subject: Attribuate a value from edit1 of form1 to edit1 of form2

From: Sprinceana

Date: 18 Mar, 2009 13:22:01

Message: 2 of 2

"Sprinceana " <mihaispr@yahoo.com> wrote in message <gpj4u0$olq$1@fred.mathworks.com>...
> How can I attribuate a value stored in edit1 of a form(edit1.fig) to another edit1 of the second form(edit2.fig).

Does anyone know?

I'm using getappdata in edit1 callback for file edit2.fig but isn't working:(.
%Code written in edit2.m associated to edit2.fig
getappdata(0,'contor','contor');

contor is initialised with 100 in first form in pushbutton1 callback:

%This is the code for edit1.m associated to edit1.fig
function pushbutton1_Callback(hObject, eventdata, handles)
contor=100; %initialisation de variable globale contor avec 100 dans l'edit1
set(handles.edit1,'string',100); %mettre en edit1 la valeur 100

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