how to convert cos(2*pi*f1*t).^2 wave into cos(2*pi*f1*t) wave?)

조회 수: 14 (최근 30일)
anam zahra
anam zahra 2017년 11월 28일
편집: Jan 2017년 11월 28일
i want to convert cosine square wave back into cosine wave.. can any one guide me please?

답변 (1개)

Jan
Jan 2017년 11월 28일
편집: Jan 2017년 11월 28일
By taking the square root?
f1 = 23;
t = linspace(0, 4*pi, 10000);
y2 = cos(2*pi*f1*t).^2;
y = sqrt(y2)
But the sign is lost. If you do not have any addition information about the phase, there is no way to find out, which parts have been positive or negative before the squaring. But wouldn't it be simpler to calculate the values directly?
y = cos(2*pi*f1*t);
? What is the problem you have to solve? Maybe you have the values of y2 and want to fit the parameter f1, such that you can create the cosine values afterwards?

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by