How to create a square wave with different amplitudes?

I need to generate a square wave from -8 to 15 with a frequency of 18 kHz. How can I do this in Simulink?

 채택된 답변

Kiran Felix Robert
Kiran Felix Robert 2022년 3월 14일

0 개 추천

Hi Sudarshan,
To get a custom square wave between -8 and 15, perform the following,
  1. Use Pulse Generator block and set the Amplitude as 23 ( 15 - (-8) = 23), Period as 1/18000 and Pulse Width as 50%.
  2. Now Add the output of a Constant block of value -8 to the output of the pulse signal

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

질문:

2022년 3월 11일

댓글:

2022년 3월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by