*Expression:
-(sqrt((a0+a1 cos wt +a2 cos 2wt )^2 +(a1sin wt +a2 sin 2wt)^2
- ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
- sqrt ((1+b1cos wt+b2 cos 2wt)^2 +(b1 sin wt+b2 sin2 wt )^2
*variables:
- a0=.2
- a1=1.2
- a2=a0=.2
- b1=1.6
- b2=.8
- F=32KHZ
*Question:
In C#, you can use System.Math
, I believe it has every function you need:
Data type depends on accuarcy you need, you can use decimal
data type.
Example:
decimal a0 = 0.2;
decimal a1 = 1.2;
decimal result = Math.Cos(a0) * a1 - Math.Sqrt(a1);
Basically, most programming languages have some sort of math library, which should contain those functions.