Given an angle get the cosine value using the sine fuction

I'm using Scicoslab in a master's degree that I'm studying.

I have the block GENSIN_f that is a Sine wave generator. This is what it does:

This block is a sine wave generator and its output is defined by the equation:

The magnitude M with the Magnitude parameter.

The frequency F in radians/second with the Frequency parameter.

The initial phase P in radians with the Phase parameter.


I need to use cos instead of sin without modifying the block.

Given the angle, how can I calculate the cosine of that angle using the sin function?

• Shift the phase. – amd Jan 10 '18 at 19:27

$$Mcos(F.t+P)=Msin(F.t+P+{\pi\over 2})$$

Several identities:

$\sin^2 + \cos^2 = 1$

$\cos (\theta) = \sin (\frac \pi 2 - \theta)$.

$\cos (\theta) = \sin (\frac \pi 2 + \theta)$

etc.

https://en.wikipedia.org/wiki/List_of_trigonometric_identities