Berikut Syntax Matlab Gerak Parabola Dengan Slider
Slider1
a=get(hObject,'Value');
handles.a=a;
guidata(hObject,handles);
b=handles.b;
set(handles.text4,'string',a);
vox=b.*cos(a.*pi/180);
voy=b.*sin(a.*pi/180);
t=2.*voy/10;
t1=0:t/100:t;
x=vox.*t1;
y=voy.*t1-5.*t1.^2;
plot(x,y,'-b');
xmaks=vox.*t;
ymaks=voy.^2/20;
tymaks=0.5*t
set(handles.edit1,'string',xmaks);
set(handles.edit2,'string',ymaks);
set(handles.edit3,'string',t);
set(handles.edit4,'string',tymaks);
Slider 2
b=get(hObject,'Value');
handles.b=b;
guidata(hObject,handles);
a=handles.a;
set(handles.text9,'string',b);
vox=b.*cos(a.*pi/180);
voy=b.*sin(a.*pi/180);
t=2.*voy/10;
t1=0:t/100:t;
x=vox.*t1;
y=voy.*t1-5.*t1.^2;
plot(x,y,'-m');
xmaks=vox.*t;
ymaks=voy.^2/20;
tymaks=0.5*t
set(handles.edit1,'string',xmaks);
set(handles.edit2,'string',ymaks);
set(handles.edit3,'string',t);
set(handles.edit4,'string',tymaks);
numpang share ya min ^^
BalasHapusbuat kamu yang lagi bosan dan ingin mengisi waktu luang dengan menambah penghasilan yuk gabung di di situs kami www.fanspoker.com
kesempatan menang lebih besar yakin ngak nyesel deh ^^,di tunggu ya.
|| bbm : 55F97BD0 || WA : +855964283802 || LINE : +855964283802 ||