Hello! Help adjust the slider for the chart of the marshout (path) of the machine
function SliderValueChanged(app, event) app.Slider = app.Slider.Value; endfunction GPSMenuSelected(app, event) gps1=[app.x;app.y]; plot(app.UIAxes,app.x,app.y,'LineWidth',2); hold on plot(app.UIAxes,app.x( app.Slider ),app.y(app.Slider ),'b--o',... 'LineWidth',6) hold offend
I use hold on but when I try to use the slider I get an error
Array indices must be positive integers or logical values.Error in OperatorMachine01/GPSMenuSelected (line 671) plot(app.UIAxes,app.x( app.Slider ),app.y(app.Slider ),'b--o',... Error using matlab.ui.internal.controller.WebMenuController/fireActionEvent (line 67)Error while evaluating Menu Callback.
Best Answer