1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
| function varargout = patient11mai(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @patient11mai_OpeningFcn, ...
'gui_OutputFcn', @patient11mai_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
% --- Executes just before patient11mai is made visible.
function patient11mai_OpeningFcn(hObject,handles, varargin)
global popVal
popVal2=popVal(1,1);
[num, txt, raw]=xlsread(strcat('C:\...........\Trial',32,num2str(popVal2),'.xls'));
[num2, txt2, raw2]=xlsread(strcat('C:\...........\Trial',32,num2str(popVal2),'.xls'),2);
%partie calcul
numcol_ex=9; numcol_wx=3;
for l=1:3
e=num2(:,numcol_wx);
w=num2(:,numcol_ex);
vect(:,l)=e-w;
numcol_wx=numcol_wx+1;
numcol_ex=numcol_ex+1;
l=l+1;
end
%Vector WM3
numcol_mx=9; numcol_wx=15;
for l=4:6
m=num2(:,numcol_wx);
w=num2(:,numcol_mx);
vect(:,l)=m-w;
numcol_wx=numcol_wx+1;
numcol_mx=numcol_mx+1;
l=l+1;
end
%Angle between M3-Wrist JC-Elbow JC :
n=length(num2);
for i=1:n
numcol_vwe=1; numcol_vwm=4;
vect(i,7)=vect(i,numcol_vwe)*vect(i,numcol_vwm)+vect(i,numcol_vwe+1)*vect(i,numcol_vwm+1)+vect(i,numcol_vwe+2)*vect(i,numcol_vwm+2);
vect(i,8)=sqrt(vect(i,numcol_vwe)*vect(i,numcol_vwe)+vect(i,numcol_vwe+1)*vect(i,numcol_vwe+1)+vect(i,numcol_vwe+2)*vect(i,numcol_vwe+2));
vect(i,9)=sqrt(vect(i,numcol_vwm)*vect(i,numcol_vwm)+vect(i,numcol_vwm+1)*vect(i,numcol_vwm+1)+vect(i,numcol_vwm+2)*vect(i,numcol_vwm+2));
vect(i,10)=(acos(vect(i,7)/(vect(i,8)*vect(i,9))))*(360/6.28);
vect(i,11)=num2(i,2);
i=i+1;
end
handles.output = hObject;
guidata(hObject, handles);
% --- Outputs from this function are returned to the command line.
function varargout = patient11mai_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
% --- Executes during object creation, after setting all properties.
function popupPatient_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in popupPatient.
function popupPatient_Callback(hObject, eventdata, handles)
contents=cellstr(get(hObject,'String'));
popPatient=contents{get(hObject,'Value')};
if (strcmp(popPatient,'Patient 1'))
popVal=1;
elseif (strcmp(popPatient,'Patient 2'))
popVal=2;
elseif (strcmp(popPatient,'Patient 3'))
popVal=3;
end
% creation dune base avec la valeur de popVal
%(soit 1, 2 ou 3 selon la selection du popup)
assignin('base','popVal',popVal); |
Partager