how can I change level of sine wave ?

7 views (last 30 days)
I want to change level of sine wave from 0-32. right now the below code generate y-axis from -64 to 64. I want to make it center at 32 not at 0. so how can i shift the level so that the center would be 32 not 0. it means y-axis would shift from 0 to 64 with center at 32. kindly help in this regard. Thanks
fs=500e3; %Very high sampling rate 500 kHz
f=10e3; %Frequency of sinusoid
nCyl=5; %generate five cycles of sinusoid
t=0:1/fs:nCyl*1/f; %time index

Accepted Answer

Andy on 11 Oct 2018
Sarfaraz Ahmed
Sarfaraz Ahmed on 11 Oct 2018
Edited: Sarfaraz Ahmed on 11 Oct 2018
Sir, Do you know answer for this thread ?

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!