⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lrd2007.m

📁 Luo-Rudy cardiac cellular action potential model
💻 M
📖 第 1 页 / 共 3 页
字号:
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
function sliderSodium_CreateFcn(hObject, eventdata, handles)
% hObject    handle to sliderSodium (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background, change
%       'usewhitebg' to 0 to use default.  See ISPC and COMPUTER.
usewhitebg = 1;
if usewhitebg
    set(hObject,'BackgroundColor',[.9 .9 .9]);
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function editSodium_Callback(hObject, eventdata, handles)
% hObject    handle to editSodium (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of editSodium as text
%        str2double(get(hObject,'String')) returns contents of editSodium as a double

na_o = str2double(get(handles.editSodium,'String'));

if  na_o >= get(handles.sliderSodium,'Min') & ...
        na_o <= get(handles.sliderSodium,'Max')
    set(handles.sliderSodium,'Value', na_o);
elseif na_o >get(handles.sliderSodium,'Max')
    set(handles.sliderSodium,'Value',get(handles.sliderSodium,'Max'));
         set(handles.editSodium,'String',num2str(get(handles.sliderSodium,'Max'))) 
elseif na_o < get(handles.sliderFreq,'Min')
    
      set(handles.sliderSodium,'Value',get(handles.sliderSodium,'Min'));
      set(handles.editSodium,'String',num2str(get(handles.sliderSodium,'Min')))
      
else
    
      set(handles.sliderSodium,'Value',get(handles.sliderSodium,'Min'));
      set(handles.editSodium,'String',num2str(get(handles.sliderSodium,'Min')))
end

handles.na_o =na_o ;
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
function editSodium_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editSodium (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end




% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from popupmenu1

val = get(hObject,'Value');
str = get(hObject,'String');

if handles.v==1
    axes(handles.axes2)
else
    axes(handles.axes3)
end

switch str{val};

    case 'Calcium (myoplasmic)' % User selects

        [h2]=plot(handles.t,1000*handles.Ca);grid on
        set(h2,'LineWidth',2')  ;ylabel(' Ca^{2+} (\mu M) ','FontSize',10,'FontWeight','bold') ;set(gca,'FontSize',10,'FontWeight','bold');
        xlabel('Time (sec)','FontSize',10,'FontWeight','bold')
        zoom on
        
          case 'Calcium total (myoplasmic)' 
        
         [h1]=plot(handles.t,handles.cmdn+handles.trpn,handles.t,handles.Ca+handles.cmdn+handles.trpn);grid on


 legend('buffered Ca^{2+}','total Ca^{2+}',0)
   set(h1,'LineWidth',2')  ;
ylabel(' Ca^{2+} [mM] ','FontSize',10,'FontWeight','bold') ;
set(gca,'FontSize',10,'FontWeight','bold');
        xlabel('Time (sec)','FontSize',10,'FontWeight','bold')
 zoom on
       
        
        
    case 'Potassium (myoplasmic)' % User selects

        h2=plot(handles.t,handles.Kai);   set(h2,'LineWidth',2')
        grid on;zoom on;  ylabel(' K^{+} (mM)','FontSize',10,'FontWeight','bold');
        set(gca,'FontSize',10,'FontWeight','bold')
        xlabel('Time (sec)','FontSize',10,'FontWeight','bold')
    case 'TMP' % User selects
        h2=plot(handles.t,handles.V,handles.t,handles.V2); ; ylabel(' TMP (mV)','FontSize',10,'FontWeight','bold'); set(gca,'FontSize',10,'FontWeight','bold');set(h2,'LineWidth',2');grid on;zoom on;
    case 'Sodium (myoplasmic)' % User selects
       h2=plot(handles.t,handles.Nai);
        grid on;zoom on;   set(h2,'LineWidth',2'); ylabel(' Na^{+} (mM)','FontSize',10,'FontWeight','bold'); set(gca,'FontSize',10,'FontWeight','bold');
        xlabel('Time (sec)','FontSize',10,'FontWeight','bold');

    case 'INa channel gates' %
        h2=plot(handles.t,handles.M,'r',handles.t,handles.J,handles.t,handles.H);
        
        legend('m','j','h',0);  grid on;set(h2,'LineWidth',2');
        ylabel(' m, j, h gates ','FontSize',10,'FontWeight','bold');zoom on ; 
        set(gca,'FontSize',10,'FontWeight','bold')
        axis tight
    case 'h- Na inactivation gate'%
        h2=plot(handles.t,handles.H); ; set(h2,'LineWidth',2');ylabel(' H gate ','FontSize',10,'FontWeight','bold');
         set(gca,'FontSize',10,'FontWeight','bold');grid on  ;zoom on ;
 
    case 'IKr channel gates'
        h2=plot(handles.t,handles.Xr); ylabel(' xr gate ','FontSize',10,'FontWeight','bold');grid on;zoom on ;
        set(h2,'LineWidth',2')
        set(gca,'FontSize',10,'FontWeight','bold')
       case 'IKs channel gates'
        h2=plot(handles.t,handles.XS,handles.t,handles.XS2);
        ylabel(' Iks gates ','FontSize',10,'FontWeight','bold');
        grid on;zoom on ; set(h2,'LineWidth',2') ;
       
    legend('xs1-fast','xs2-slow',0)
        set(gca,'FontSize',10,'FontWeight','bold')
    
    case 'ICal channel gates' %
        h2=plot(handles.t,handles.d); ylabel(' d ','FontSize',10,'FontWeight','bold');grid on;zoom on ; set(h2,'LineWidth',2')
       xlabel('Time (sec)','FontSize',10,'FontWeight','bold')

    case 'ICaL channel gates' %
        h2=plot(handles.t,handles.d,'r',handles.t,handles.f,handles.t,handles.fca);grid on;zoom on ; set(h2,'LineWidth',2')
        ylabel(' I_{Ca(L)} gates ','FontSize',10,'FontWeight','bold')
        legend('d-activation','f-inactivation','fca- inactivation Ca^{2+}',0)
        set(gca,'FontSize',10,'FontWeight','bold')
   xlabel('Time (sec)','FontSize',10,'FontWeight','bold')

    case 'JSR' %
        h2=plot(handles.t,handles.JSR);grid on;zoom on
        ylabel(' Ca^{2+}_{jSR} ','FontSize',10,'FontWeight','bold') ; set(h2,'LineWidth',2') ; set(h2,'LineWidth',2')
    case 'Ca in SR' %
         h2=plot(handles.t,handles.NSR,handles.t,handles.JSR,handles.t,handles.JSR+handles.csqn);grid on;zoom on
        ylabel(' [Ca^{2+}] in SR (mM) ','FontSize',10,'FontWeight','bold') ;
         legend('[Ca^{2+}] in nSR','free [Ca^{2+}] in jSR','Total [Ca^{2+}] in jSR',0);
        set(h2,'LineWidth',2');set(gca,'FontSize',10,'FontWeight','bold')
         
end
guidata(hObject,handles)
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to popupmenu1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end




% --- Executes on selection change in popupmenu2.
function popupmenu2_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns popupmenu2 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from popupmenu2
val = get(hObject,'Value');
str = get(hObject,'String');
if handles.v==1
    axes(handles.axes2)
else
    axes(handles.axes3)
end
zoom on
switch str{val};
    case 'INa (Fast Na current)'
%     
        h2=plot(handles.t,handles.INa);
        grid on  ; set(h2,'LineWidth',2');zoom on;
        ylabel(' I_{Na} (\mu A/ \mu F)','FontSize',10,'FontWeight','bold'); set(gca,'FontSize',10,'FontWeight','bold') ;xlabel('Time (sec)','FontSize',10,'FontWeight','bold');
  
       case 'INa normalized conductance' %
        h2=plot(handles.t,(handles.J).*(handles.H).*(handles.M).^3);
        ylabel(' G_{Na} (mS/\mu F)','FontSize',10,'FontWeight','bold');
        grid on;zoom on ; set(h2,'LineWidth',2');grid on;zoom on ;
    set(gca,'FontSize',10,'FontWeight','bold')
    case 'IKs (Slow delayed rectifier K current)'
        h2=plot(handles.t,handles.iks);grid on
        set(h2,'LineWidth',2');  ylabel(' I_{Ks}  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold')
        set(gca,'FontSize',10,'FontWeight','bold'); xlabel('Time (sec)','FontSize',10,'FontWeight','bold');zoom on;
    
    case 'IKs normalized conductance'
        h2=plot(handles.t,handles.G_Ks);grid on;zoom on
        ylabel(' G_{Ks}(mS/\mu F) ','FontSize',10,'FontWeight','bold') ; set(h2,'LineWidth',2')
    set(gca,'FontSize',10,'FontWeight','bold')
    case 'IKr (Fast delayed rectifier K current)'
        h2=plot(handles.t,handles.ikr);grid on
        set(h2,'LineWidth',2'),  ylabel(' I_{Kr} (\mu A/ \mu F) ','FontSize',10,'FontWeight','bold'),
        set(gca,'FontSize',10,'FontWeight','bold')
        xlabel('Time (sec)','FontSize',10,'FontWeight','bold');zoom on; grid on  ;
    
     case 'IKr normalized conductance'
        h2=plot(handles.t,handles.G_Kr);grid on;zoom on
        ylabel(' G_{Kr}(mS/\mu F)','FontSize',10,'FontWeight','bold') ;
        set(h2,'LineWidth',2')
        set(gca,'FontSize',10,'FontWeight','bold')
    
    case 'ICal (Ca current through L-type channel)'
        h2=plot(handles.t,handles.ical);grid on
        set(h2,'LineWidth',2'),  ylabel(' I_{Ca}  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold'), set(gca,'FontSize',10,'FontWeight','bold')
        xlabel('Time (sec)','FontSize',10,'FontWeight','bold');zoom on;set(gca,'FontSize',10,'FontWeight','bold')
     case 'ICaL normalized conductance'
        h2=plot(handles.t,(handles.f).*(handles.d).*(handles.fca));grid on
        set(h2,'LineWidth',2'),  ylabel('G_{ICa(L),Ca} (mS/ \mu F) ','FontSize',10,'FontWeight','bold'), set(gca,'FontSize',10,'FontWeight','bold')
        xlabel('Time (sec)','FontSize',10,'FontWeight','bold');zoom on;set(gca,'FontSize',10,'FontWeight','bold')
  
    
    
    case 'ICalNa'
        h2=plot(handles.t,handles.icalna);ylabel(' IlCaNa  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold') ; set(h2,'LineWidth',2');grid on;zoom on
    case 'ICalK'
        h2=plot(handles.t,handles.icalk);ylabel(' IlCaK  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold') ; set(h2,'LineWidth',2');grid on;zoom on
    case 'Irel (Ca release from JSR)'
        h2=plot(handles.t,handles.ir);ylabel(' I_{rel} (mM/msec)','FontSize',10,'FontWeight','bold') ; set(h2,'LineWidth',2'),grid on;zoom on
 set(gca,'FontSize',10,'FontWeight','bold');
    case 'Irel conductance'
        h2=plot(handles.t,handles.Grel);ylabel(' G_{rel} (mM/sec)','FontSize',10,'FontWeight','bold') ; set(h2,'LineWidth',2'),grid on;zoom on
 set(gca,'FontSize',10,'FontWeight','bold');
    case 'ICat'
        h2=plot(handles.t,handles.icat);grid on;zoom on;
        set(h2,'LineWidth',2') ; ylabel(' Ca tran  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold')
        set(gca,'FontSize',10,'FontWeight','bold'); xlabel('Time (sec)','FontSize',10,'FontWeight','bold')
    case 'INaCa (Na/Ca  exchanger)'
        h2=plot(handles.t,handles.inaca);grid on;;zoom on
        set(h2,'LineWidth',2') ;
        ylabel(' INaCa  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold');
           set(gca,'FontSize',10,'FontWeight','bold')
    case 'INaK (Na/K pump)'
        h2=plot(handles.t,handles.inak);  grid on;zoom on;
        set(h2,'LineWidth',2') ;
        ylabel(' Inak  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold');
   set(gca,'FontSize',10,'FontWeight','bold')
    case 'ICab, IpCa'
        h2=plot(handles.t,handles.icab,handles.t,handles.ipca);  grid on;zoom on;legend('I_{Cab}','I_{pCa}',0)
        set(h2,'LineWidth',2') ; ylabel(' ICab  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold');  set(gca,'FontSize',10,'FontWeight','bold')
    case 'Iup'
        h2=plot(handles.t,handles.iup,handles.t,handles.ileak);  grid on;zoom on;
        legend('I_{up}','I_{leak}',0)
         %title(['$\int Ca^{2+}dt=$', num2str(sum(-handles.iup+handles.ir+handles.ileak))], 'fontsize',12,'interpreter','latex');
        set(h2,'LineWidth',2') ; ylabel('  (mM)','FontSize',10,'FontWeight','bold');  set(gca,'FontSize',10,'FontWeight','bold')
    case 'INab'
        h2=plot(handles.t,handles.inab);  grid on;zoom on;
        set(h2,'LineWidth',2') ; ylabel('INab  (\mu A/ \mu F)','FontSize',10,'FontWeight','bold');
    case 'Stimulus current'
        h2=plot(handles.t,handles.stm);  grid on;zoom on;
        set(h2,'LineWidth',2') ; ylabel('Stimuli (\mu A/ \mu F)','FontSize',10,'FontWeight','bold');
         set(gca,'FontSize',10,'FontWeight','bold');
    case 'IK1 (Time independent K current)' 
        h2=plot(handles.t,handles.IK1,handles.t,handles.IK1+handles.IKp);  grid on;zoom on;
        set(h2,'LineWidth',2') ; ylabel('IK1 (\mu A/ \mu F)','FontSize',10,'FontWeight','bold'); set(gca,'FontSize',10,'FontWeight','bold')
  
    case 'IKp (Plateau K current)'
        h2=plot(handles.t,handles.IKp);  grid on;zoom on;
    
        set(h2,'LineWidth',2') ; ylabel('IKp (\mu A/ \mu F)','FontSize',10,'FontWeight','bold');
 
    set(gca,'FontSize',10,'FontWeight','bold')
   
    case 'IK1 normalized conductance'
        h2=plot(handles.t,handles.G_K1);  grid on;zoom on;
        set(h2,'LineWidth',2') ; ylabel('G_{K1} (mS/\mu F)','FontSize',10,'FontWeight','bold');
      set(gca,'FontSize',10,'FontWeight','bold')
   case 'Total Ca'
        %
        h2=plot(handles.t,handles.caiont);grid on;zoom on
        ylabel('$\sum Ca^{2+}dt \mu A/\mu F$','FontSize',10,'FontWeight','bold','interpreter','latex') ;
        %          legend('\int [Ca^{2+}]dt=', num2str(Int_caiont),0);
        set(h2,'LineWidth',2');set(gca,'FontSize',10,'FontWeight','bold')
       % title(['$\int \sum Ca^{2+}dt=$', num2str(handles.Int_caiont)], 'fontsize',12,'interpreter','latex');
    case 'Total Na' %
        h2=plot(handles.t,handles.naiont);grid on;zoom on
        ylabel('$\sum Na^{+}~ [\mu A/\mu F]$','FontSize',12,'FontWeight','bold','interpreter','latex') ;
        set(h2,'LineWidth',2');set(gca,'FontSize',10,'FontWeight','bold')
       % title(['$\int Na^{+}dt=$', num2str(handles.Int_naiont)], 'fontsize',12,'interpreter','latex');

    case 'Total K' %

        h2=plot(handles.t,handles.kiont);grid on;zoom on
        ylabel('$\sum K^{+}~ [\mu A/\mu F]$','FontSize',12,'FontWeight','bold','interpreter','latex') ;
        set(h2,'LineWidth',2');set(gca,'FontSize',10,'FontWeight','bold')
      % title(['$\int\sum K^{+}dt=$', num2str(handles.Int_kiont)], 'fontsize',12,'interpreter','latex');
        
       case 'SR flux' %

        h2=plot(handles.t,handles.SR_flux);grid on;zoom on
        ylabel('$\sum Ca^{2+}_{SR}~ [mM]$','FontSize',12,'FontWeight','bold','interpreter','latex') ;
        set(h2,'LineWidth',2');set(gca,'FontSize',10,'FontWeight','bold')
        title(['$\int\sum Ca^{2+}_{SR}dt=$', num2str(handles.SR_flux_avg)], 'fontsize',12,'interpreter','latex');  

case 'dVdT' %

        h2=plot(handles.t,handles.I_Total);grid on;zoom on
        ylabel('$\frac{\partial{V}}{\partial{t}}$ [mV]','FontSize',14,'FontWeight','bold','interpreter','latex') ;
        set(h2,'LineWidth',2');set(gca,'FontSize',10,'FontWeight','bold')
 case 'CaMKII' %

        h2=plot(handles.t,handles.CamKII_active);grid on;zoom on
        ylabel('CaMKII $\%$ ','FontSize',14,'FontWeight','bold','interpreter','latex') ;
        set(h2,'LineWidth',2');set(gca,'FontSize',10,'FontWeight','bold')
            
       
end





% --- Executes during object creation, after setting all properties.
function popupmenu2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to popupmenu2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end





% --- Executes on button press in radiobutton1.
function radiobutton1_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton1

%handles.axes1=handles.axes2;guidata(hObject, handles);

v=get(hObject,'Value');
if v==1
    axes(handles.axes1);
    handles.v=v;

else
    axes(handles.axes2)
    handles.v=v;

end
guidata(hObject, handles);



% --- Executes when user attempts to close figure1.
function figure1_CloseRequestFcn(hObject, eventdata, handles)
% hObject    handle to figure1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: delete(hObject) closes the figure
delete(hObject);








% 


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -