How to update Sine Wave block in Simulink using GUI Slider .?

1 view (last 30 days)
waveLen=get(handles.slider1,'Value')
set_param('ExampleSimulation/Sine Wave', 'Amplitude', num2str(waveLen));
set_param('ExampleSimulation','SimulationCommand','update')
I am using above code to Update Amplitude of Sine Wave block in Simulink using GUI in MATLAB. But it is not updating Amplitude in scope.! Is there any error in code.?

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!