Generating discrete values in simulink

1 view (last 30 days)
Hello. I want to generate this signal in Simulink: c=0:.001:1; h=3; x_0=0; x_d=x_0 + h*(c-sin(2*pi*c)/(2*pi)); but I don't know how can I generate c in Simulink?

Accepted Answer

Majid Farzaneh
Majid Farzaneh on 21 May 2018
Hi, You can use Constant block and set the constant value to 0:0.001:1 but if c is time for you and you want to show the output on scope you can use a clock block for c like this:
Majid Farzaneh
Majid Farzaneh on 21 May 2018
If your increment value (0.001) is important for you, you can use 'Digital Clock' and set the Sample Time to '0.001' and set the simulation time to 1. So you have 0:0.001:1 for clock.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by