1
我製作了一個simulink模型,並通過MATLAB GUI運行它,其中包含一個BLDC電機和一個控制其速度的PI控制器,現在問題是輸出apeed圖形在我停止時更新仿真我想GUI圖形的實時更新
% Update the string on the pushbutton
set(handles.Startstopbutton,'String','Start Simulation')
% Plot results from workspace after simulation
x = evalin('base','Scope(:,1)');
y = evalin('base','Scope(:,2)');
pHandles = plot(x,y,'Parent',handles.axesplot);
這就是我的圖形更新功能