How to build a graph from two graphs at certain intervals

Hi, i have some problem I need to build a schedule of two graphs in simulink I have a graph y1 and y2 but I need 1 graph which will be composed like this:   on the interval (0;t1) there will be a function y1 on the interval (t1;t2) there will be a function y2 and on the interval (t2;t3) there will be a function y1 again t1, t2, t3 some numbers
for example, I have a function (y=sinx) that should be built on an interval from 0 to 1 and there is still a function y=
5 that is built from 1 to 2
what block in Simulink can do it? Or what can be done?

Answers (1)

From the diagram, it seems that it can be achieved by using a Switch block. Compare y1 with zero using a Relational Operator block. If it is true, pass y1. Otherwise, pass a constant of 5. y1 can be generated using the Sine Wave block. You will need to adjust the frequency.

Categories

Find more on Simulink in Help Center and File Exchange

Products

Release

R2016a

Asked:

on 7 Nov 2018

Answered:

on 8 Nov 2018

Community Treasure Hunt

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

Start Hunting!