How can I model the following function, f(t) in simulink?

1 view (last 30 days)
f(t) = '8t-3' for 0 =< t =< 3; = 't^3 -6' for 3 < t =< 7 and = 337 for t > 7

Answers (1)

Sebastian Castro
Sebastian Castro on 12 Jul 2017
I'd use a Clock block to generate the time signal, and then stick that signal through a MATLAB Function block that implements your piecewise function with if-statements.
... if you want something more "Simulinky", you can instead do this with a bunch of comparison and Switch blocks from the Logical Operators library.
- Sebastian

Products

Community Treasure Hunt

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

Start Hunting!