GUİ KÜTLE MERKEZİ

  Biyomekanik ikinci ödevi olan verilen text koordinatlarından kütle merkezini bulmayı ve vücudun her değişimde kütle merkezinin nasıl değiştiğini matlab gui ile örneklendirelim. katsayıları daha önceden verilen tablodan alınmaktadır: Segment Endpoints Seg. mass Centre of mass Radius of gyration name (proximal to /total mass /segment length /segment length distal) (P) (Rproximal) (Rdistal) (Kcg) (Kproximal) (Kdistal) Hand wrist axis to 0.0060 0.506 0.494 0.298 0.587 0.577 knuckle II third finger Forearm elbow axis to 0.0160 0.430 0.570 0.303 0.526 0.647 ulnar styloid Upper glenohumeral joint to 0.0280 0.436 0.564 0.322 0.542 0.645 arm elbow axis Forearm elbow axis to 0.0220 0.682 0.318 0.468 0.827 0.565 & hand ulnar styloid Upper glenohumeral joint to 0.0500 0.530 0.470 0.368 0.645 0.596 extremity elbow axis Foot lateral malleolus to 0.0145 0.500 0.500 0.475 0.690 0.690 head metatarsal II Leg femoral condyles to 0.0465 0.433 0.567 0.302 0.528 0.643 medial malleolus Thigh greater trochanter to 0.1000 0.433 0.567 0.323 0.540 0.653 femoral condyles Leg femoral condyles to 0.0610 0.606 0.394 0.416 0.735 0.572 & foot medial malleolus Lower greater trochanter to 0.1610 0.447 0.553 0.326 0.560 0.650 extremity medial malleolus Head C7-T1 to ear canal 0.0810 1.000 0.000 0.495 1.116 0.495 Shoulder sternoclavicular joint to 0.0158 0.712 0.288 glenohumeral joint Thorax C7-T1 to T12-L1 0.2160 0.820 0.180 Abdomen T12-L1 to L4-L5 0.1390 0.440 0.560 Pelvis L4-L5 to trochanter 0.1420 0.105 0.895 Thorax C7-T1 to L4-L5 0.3550 0.630 0.370 & abdomen Abdomen T12-L1 to 0.2810 0.270 0.730 & pelvis greater trochanter Trunk greater trochanter to 0.4970 0.495 0.505 0.406 0.640 0.648 glenohumeral joint Trunk greater trochanter to 0.5780 0.660 0.340 0.503 0.830 0.607 & head glenohumeral joint Head, arms greater trochanter to 0.6780 0.626 0.374 0.496 0.798 0.621 & trunk glenohumeral joint Head, arms greater trochanter to 0.6780 1.142 -0.142 0.903 1.456 0.914 & trunk midrib
function varargout = odev2_kutle_merkezi(varargin)

gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
 'gui_Singleton', gui_Singleton, ...
 'gui_OpeningFcn', @odev2_kutle_merkezi_OpeningFcn, ...
 'gui_OutputFcn', @odev2_kutle_merkezi_OutputFcn, ...
 'gui_LayoutFcn', [] , ...
 'gui_Callback', []);
if nargin && ischar(varargin{1})
 gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
 gui_mainfcn(gui_State, varargin{:});
end
function odev2_kutle_merkezi_OpeningFcn(hObject, eventdata, handles, varargin)

handles.output = hObject;

% Update handles structure
guidata(hObject, handles);


function varargout = odev2_kutle_merkezi_OutputFcn(hObject, eventdata, handles) 

varargout{1} = handles.output;

function baslat_pushbutton_Callback(hObject, eventdata, handles)

load('jump.txt');
 set(handles.veriler_listbox,'String','Verileri Buradan İnceleyebilirsiniz:');

for i=1:40
 
j=i*6;

%head+trunk
data =jump(j-5:j-5,1);
data2=jump(j-4:j-4,1);
datay =jump(j-5:j-5,2);
datay2=jump(j-4:j-4,2);
headcx = data+0.5921*(data2- data);
headcy=datay+0.5921*(datay2- datay);

axis equal;
grid on;
plot(headcx,headcy,'y*');
hold on;




%thigh
datat =jump(j-4:j-4,1);
datat2=jump(j-3:j-3,1);
dataty =jump(j-4:j-4,2);
dataty2=jump(j-3:j-3,2);
thighcx = datat+0.3719*(datat2- datat);
thighcy=dataty+0.3719*(dataty2- dataty);

plot(thighcx,thighcy,'k*');
hold on;

%leg
datah =jump(j-3:j-3,1);
datah2=jump(j-2:j-2,1);
datahy =jump(j-3:j-3,2);
datahy2=jump(j-2:j-2,2);
legcx = datah+0.3705*(datah2- datah);
legcy=datahy+0.3705*(datahy2- datahy);

plot(legcx,legcy,'c*');
hold on;

%foot1

datal =jump(j-2:j-2,1);
datal2=jump(j-1:j-1,1);
dataly =jump(j-2:j-2,2);
dataly2=jump(j-1:j-1,2);
foot1cx = datal+0.4622*(datal2- datal);
foot1cy=dataly+0.4622*(dataly2- dataly);

plot(foot1cx,foot1cy,'m*');

hold on;


%foot2

dataf =jump(j-1:j-1,1);
dataf2=jump(j:j,1);
datafy =jump(j-1:j-1,2);
datafy2=jump(j:j,2);
foot2cx = dataf+0.4485*(dataf2- dataf);
foot2cy=datafy+0.4485*(datafy2- datafy);
plot(foot2cx,foot2cy,'g*');

hold on;


%center of mass
cox=( 6.4*headcx+3.6*thighcx+1.6*legcx+0.6*foot1cx+0.6*foot2cx)/12.8;
coy=( 6.4*headcy+3.6*thighcy+1.6*legcy+0.6*foot1cy+0.6*foot2cy)/12.8;
set (handles.x_text,'String',cox);
set (handles.y_text,'String',coy);


plot(cox,coy,'ro');
 %w = waitforbuttonpress;
 tum_veriler = get(handles.veriler_listbox,'String');
 yeni_satir = [' Trunk:',int2str(headcx),' ',int2str(headcy),' c.g:',int2str(thighcx),' ',int2str(thighcy),' Leg:',int2str(legcx),' ',int2str(legcy),' Lower Leg:',int2str(foot2cx),' ',int2str(foot2cy),' Foot:',int2str(foot1cx),' ',int2str(foot1cy),' Merkez:',int2str(cox),' ',int2str(coy)];
 
 if isempty(tum_veriler)
 tum_veriler = yeni_satir; 
elseif ~iscell(tum_veriler)
 tum_veriler = {tum_veriler yeni_satir};
else
 tum_veriler = {tum_veriler{:} yeni_satir};
 end
set(handles.veriler_listbox,'String',tum_veriler);
end
hold off;

function veriler_listbox_Callback(hObject, eventdata, handles)

function veriler_listbox_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
 set(hObject,'BackgroundColor','white');
end
Kodu:odev2_kutleme_merkezi
barcode
Destek ?in Buradaki Reklamlar? T?klayabilirsiniz.
Destek ?in Buradaki Reklamlar? T?klayabilirsiniz.

Ses Kontrolleri

Tam Ekran Yap