Custom square wave in simulink

조회 수: 52 (최근 30일)
SM
SM 2024년 10월 28일 11:36
댓글: SM 2024년 10월 29일 9:51
I need to create a square wave with two different amplitudes as shown in the attached image. The total time duration is 50s. The signal can be divided into two parts: i)Upto 15s, I need a step signal of amplitude -1.5. ii)Starting from 15s onwards, I need a square wave with lower half of -2, and upper half of -1 (With apmlitude of 1, Period of 20, pulse width of 50%). I am able to simulate the part ii) in SImulink using the pulse generator. However, I need a signal with both part i) and ii), and that I am unable to do using only pulse generator or other ways. The file fig contains the waveform of part ii) Please help.

채택된 답변

Hitesh
Hitesh 2024년 10월 29일 7:00
Hi
You need to use "Signal Editor" block to create custom signals to achieve the desired result. I have created the same signal with the help of "Signal Editor". Refer to the below scope image:
For more information on "Signal Editor" Block, refer the following MATLAB documentation:
  댓글 수: 1
SM
SM 2024년 10월 29일 9:51
@Hitesh Thank you so much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by