1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How to display a real time graph in the Matlab GUI from simulink block

  1. May 8, 2012 #1
    I want to display a real time signal from ECG
    I use simulink block -scope and want it to be display in gui axes
    This is a code from some other guy

    function Command1_Callback(hObject, eventdata, handles)
    button_state = get(hObject,'Value');
    if strcmp(get(handles.Command1,'String'),'Start Recording') && (button_state == get(hObject,'Max'))
    % toggle button is depressed
    set(hObject,'String','Stop Recording');
    grid on;
    elseif strcmp(get(handles.Command1,'String'),'Stop Recording') && (button_state == get(hObject,'Max'))
    set(hObject,'String','Start Recording');
    guidata(hObject, handles); %updates the handles

    But it doesn't work for my GUI , i don't know why ,can anyone tell which code is the input for simulink block and if there is any mistake please mention it.Thanks

    Attached Files:

    Last edited: May 9, 2012
  2. jcsd
  3. May 9, 2012 #2
    Can anyone help me ?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook