مساعدة في gui ضروري !

بسم الله الرحمن الرحيم
السلام عليكم ورحمة الله وبركاته
الرجاء مساعدتي في gui
وسؤالي هو عن edit text ?
أريد أت أصمم واجهة بسيطة لحساب مساحة مستطيل
بحيث تحتوي على 3 edit text
وزر تحكم push button ,والفكرة هي : أن يدخل الطالب الطول في edit text1
والعرض فيedit text2 ثم يضغط على push button فيحصل على الناتج
في edit text3.
ماهي الجمل البرمجية اللازمة لجعل edit text يقبل إدخال البيانات
و ماهي الجمل البرمجية اللازمة لجعل edit text يظهر المخرجات
" أي ناتج العمليات" أنا أعرف أن الكثيرين منكم يا إخواني في المنتدى
ضليعين وخبراء في الماتلاب ، ساعدوا أختكم في هذه المسألة
وجزاكم الله كل خير .

البرنامج عندك في المرفقات
ربنا يوفئك

الله يجزيك كل خير على الرد السريع , وأنا حابة أطوره لطلابي في المدرسة
ليشمل كل الأشكال الهندسية والمجسمات …
لكن لما حاولت أجرب البرنامج أعطاني في command window: error
ما السبب؟
وشكرا جزيلا مرة أخرى

انتي عندك version كام لم لقل من 7 هيعمل error

عندي Matlab 7

انا جربتو عندي تاني واشتغل

طب ممكن تكتبي ال error اللي طلعلك

> open(‘C:\DOCUME~1\Zcom\LOCALS~1\Temp\Rar$DI00.435\rectangular.fig’)
??? Error using ==> struct2handle
Undefined command/function ‘rectangular’.

??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn.

??? Error using ==> struct2handle
Undefined command/function ‘rectangular’.

??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn.

??? Error using ==> struct2handle
Undefined command/function ‘rectangular’.

??? Error using ==> struct2handle
Error while evaluating uicontrol CreateFcn.

??? Undefined command/function ‘rectangular’.
??? Error while evaluating uicontrol Callback.
??? Undefined command/function ‘rectangular’.
??? Error while evaluating uicontrol Callback.
??? Undefined command/function ‘rectangular’.
??? Error while evaluating uicontrol Callback.

اكيد في عندك مشكله في البرنامج في ملف في المرفقات اتمني يفيدك

you must run program from m file not from fig file

شكرا على تعاونك معي جعله الله في ميزان حسناتك
ولكني حاولت أن أنشئ guiجديدة علشان أتعلم
وقمت بكل الخطوات "نفس الكود"
ولكن بعد عمل run يعطيني NaN بدلا من المساحة كما يعطي في
COMMAND WINDOW:
??? Error using ==> feval
Undefined command/function ‘edit4_Callback’.
Error in ==> gui_mainfcn at 75
feval(varargin{:});
Error in ==> example at 44
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.

لقد غيرت خصائص string , tag لكل من edit text الثلاثة
هل هناك تغيير اخر يجب أت أقوم به في property inspector ؟؟

اسف اتاخرت في الرد

بس لا مافيش تغيير اخر

ممكن تبعتيلي ال file الجديد بتاعك وانا اشوفلك فين الغلط

أسفة على التأخير وشكرا لمساعدتك
البرنامج اشتغل وكله تمام جزاك الله كل
خير أنت وجميع الاخوة أعضاء هذا المنتدى الرائع
لو عندي استفسارات أخرى ممكن؟؟؟؟؟

طبعا لو عندك اي استفسار اتفضلي اسالي ويارب اقدر اساعدك

ربنا يوفقك

السلام
لو ممكن اتدخل بالافادة ان شاء الله انا عملت بالمرفقات برنامج بسيط لحساب مساحة المستطيل
اعتقد انه اكثر وضوحا للمبتدئين لكي يتعلموا منه
شكرا للاخت ايجيبت على هذا النشاط الواضح والمشاركات الرائعه

comment relaie les paramètre d entrer(edit) dans la 1 er interface avec les paramètre de sortie dans la 2eme interface(text)qui sont des équation en fonction des paramètre d entre dans cette code
% LA FUGIRE de linterface de choix de zone urbain
handles(60)= figure(‘units’,‘pixels’,…
‘position’, [10 60 450 550],…
‘color’,[0.1 0.2 0.6],…
‘Resize’,‘off’ ,…
‘visible’,‘on’,…
‘numbertitle’,‘off’,…
‘name’,’[LOGICIEL] Zone urbain’,…
‘menubar’,‘none’,…
‘tag’,‘interface’);
text60 = uicontrol( handles(60), ‘style’ , ‘text’ , ‘position’ , [100,475,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ‘Paramètres d entrèe’ , ‘fontsize’ , 20 )
movegui(‘center’);% POUR CENTRER LINTERFACE%%%%%%%%%%%%%%%%%%%
%LEs BOTONs de suivant
handles(61)=uicontrol(handles(60),‘style’,‘pushbutton’,…
‘units’,‘normalized’,…
‘position’,[0.7 0.1 0.2 0.07],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,‘Suivant’,…
‘callback’,‘val_variable7 = set(handles(70) , ‘‘visible’’,’‘on’’ )’,…
‘tag’,‘bouton+’);

%LE BOTON RETOUR
handles(62)=uicontrol(handles(60),‘style’,‘pushbutton’,…
‘units’,‘normalized’,…
‘position’,[0.1 0.1 0.2 0.07],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,‘RETOUR’,…
‘callback’,‘val_variable7 = set(handles(60) , ‘‘visible’’,’‘off’’ )’,…
‘tag’,‘bouton+’);
%les text
text61 = uicontrol( handles(60), ‘style’ , ‘text’ , ‘position’ , [10,390,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ Qualitè de service’ , ‘fontsize’ , 14 )
ed_a=uicontrol(gcf,‘style’,‘edit’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.73 0.2 0.04],…
‘fontsize’,12);
text62 = uicontrol( handles(60), ‘style’ , ‘text’ , ‘position’ , [10,350,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ Nbre de frèq disp’ , ‘fontsize’ , 14 )
ed_b=uicontrol(gcf,‘style’,‘edit’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.65 0.2 0.04],…
‘fontsize’,12);
text63 = uicontrol( handles(60), ‘style’ , ‘text’ , ‘position’ , [10,310,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ nombre d abonnès’ , ‘fontsize’ , 14 )
ed_c=uicontrol(gcf,‘style’,‘edit’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.58 0.2 0.04],…
‘fontsize’,12);
text64 = uicontrol( handles(60), ‘style’ , ‘text’ , ‘position’ , [10,270,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ nombre d appel’ , ‘fontsize’ , 14 )
ed_d=uicontrol(gcf,‘style’,‘edit’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.51 0.2 0.04],…
‘fontsize’,12);
text65 = uicontrol( handles(60), ‘style’ , ‘text’ , ‘position’ , [10,230,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ durèe d appel(s)’ , ‘fontsize’ , 14 )
ed_e=uicontrol(gcf,‘style’,‘edit’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.435 0.2 0.04],…
‘fontsize’,12);

text66 = uicontrol( handles(60), ‘style’ , ‘text’ , ‘position’ , [10,190,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ‘choix de motif’ , ‘fontsize’ , 14 )
ed_f=uicontrol(gcf,‘style’,‘edit’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.355 0.2 0.04],…
‘fontsize’,12);
text67 = uicontrol( handles(60), ‘style’ , ‘text’ , ‘position’ , [10,150,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ ,’ rayon de cellule(m)’ , ‘fontsize’ , 14 )
ed_g=uicontrol(gcf,‘style’,‘edit’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.28 0.2 0.04],…
‘fontsize’,12);
h=findobj(gcbf,‘tag’,‘edit_a’);
a=str2num(get(h,‘string’));
h=findobj(gcbf,‘tag’,‘edit_b’);
b=str2num(get(h,‘string’));
h=findobj(gcbf,‘tag’,‘edit_c’);
c=str2num(get(h,‘string’));
h=findobj(gcbf,‘tag’,‘edit_d’);
d=str2num(get(h,‘string’));
h=findobj(gcbf,‘tag’,‘edit_e’);
e=str2num(get(h,‘string’));
h=findobj(gcbf,‘tag’,‘edit_f’);
f=str2num(get(h,‘string’));
h=findobj(gcbf,‘tag’,‘edit_g’);
g=str2num(get(h,‘string’));
% LA FUGIRE de linterface de choix de zone urbain (Paramètres de sortie)

handles(70)= figure(‘units’,‘pixels’,…
‘position’, [10 60 450 550],…
‘color’,[0.1 0.2 0.6],…
‘Resize’,‘off’ ,…
‘visible’,‘off’,…
‘numbertitle’,‘off’,…
‘name’,’[LOGICIEL] Zone urbain’,…
‘menubar’,‘none’,…
‘tag’,‘interface’);
text70 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [100,475,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ‘Paramètres de sortie’ , ‘fontsize’ , 20 )
movegui(‘center’);% POUR CENTRER LINTERFACE%%%%%%%%%%%%%%%%%%%
%LEs BOTONs de suivant
handles(71)=uicontrol(handles(70),‘style’,‘pushbutton’,…
‘units’,‘normalized’,…
‘position’,[0.7 0.06 0.2 0.07],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,‘Suivant’,…
‘callback’,‘val_variable7 = set(handles(80) , ‘‘visible’’,’‘on’’ )’,…
‘tag’,‘bouton+’);
%LE BOTON RETOUR
handles(72)=uicontrol(handles(70),‘style’,‘pushbutton’,…
‘units’,‘normalized’,…
‘position’,[0.1 0.06 0.2 0.07],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,‘RETOUR’,…
‘callback’,‘val_variable7 = set(handles(70) , ‘‘visible’’,’‘off’’ )’,…
‘tag’,‘bouton+’);
%les text
text71 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [10,390,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ Trafic / Usagè’ , ‘fontsize’ , 14 )
b1=uicontrol(handles(70),‘style’,‘text’,…
‘position’,[0.6 0.73 0.2 0.04],…
‘units’,‘normalized’,…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,’’,…
‘callback’,@ajouet,…
‘tag’,‘bouton+’);
text72 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [10,350,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ‘Trafic Total’ , ‘fontsize’ , 14 )
b2=uicontrol(handles(70),‘style’,‘text’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.65 0.2 0.04],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,’’,…
‘callback’, @ajouer,…
‘tag’,‘bouton+’);
text73 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [10,310,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ Nbre de frèq /cellule’ , ‘fontsize’ , 14 )
b3=uicontrol(handles(70),‘style’,‘text’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.58 0.2 0.04],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,’’,…
‘callback’, @ajouer,…
‘tag’,‘bouton+’);
text74 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [10,270,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ Nombre TCH total’ , ‘fontsize’ , 14 )
b4=uicontrol(handles(70),‘style’,‘text’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.51 0.2 0.04],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,’’,…
‘callback’, @ajouer,…
‘tag’,‘bouton+’);
text75 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [10,230,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ Nombre TRX total’ , ‘fontsize’ , 14 )
b5=uicontrol(handles(70),‘style’,‘text’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.435 0.2 0.04],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,’’,…
‘callback’, @ajouer,…
‘tag’,‘bouton+’);

text76 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [10,190,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ , ’ Nombre de cellule’ , ‘fontsize’ , 14 )
b6=uicontrol(handles(70),‘style’,‘text’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.355 0.2 0.04],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,’’,…
‘callback’, @ajouer,…
‘tag’,‘bouton+’);
text77 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [10,150,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ ,’ distance de rèutilisation’ , ‘fontsize’ , 14 )
b7=uicontrol(handles(70),‘style’,‘text’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.285 0.2 0.04],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,’’,…
‘callback’, @ajouer,…
‘tag’,‘bouton+’);
text78 = uicontrol( handles(70), ‘style’ , ‘text’ , ‘position’ , [10,110,250,30] ,‘fontsize’,16,…
‘foregroundcolor’,[1 1 0.501],‘backgroundcolor’,[0.1 0.2 0.6],‘string’ ,’ Nombre de site’ , ‘fontsize’ , 14 )
b8=uicontrol(handles(70),‘style’,‘text’,…
‘units’,‘normalized’,…
‘position’,[0.6 0.21 0.2 0.04],…
‘fontsize’,12,…
‘Interruptible’,‘off’,…
‘string’,’’,…
‘callback’,’@ajouter’,…
‘tag’,‘bouton+’);

tu peut envoyer sur cette pseudo..............hamido24008@live.fr