Im trying to generate sample values of x(t), y(t), and z(t) at a sample
rate of 0.01 for "0 less than or equal to" t and "less than or equal to 6"
Basically trying to store the sampled values in their respective files, but kind of lost on where to start?
x(t) = sin(2*pi*t)
y(t) = 2*sin(16*pi*t/3) + cos (2*pi*t/3)
z(t) = x(t)*z(t)
*all i know is this
Code:#include <math.h> #include <iostream> #include <iomanip> using namespace std; #define PI 3.14159265 int main () { double rate, result; rate = 30.0; result = sin (rate*PI/180); cout<<"The sine of " << rate << " degrees is " << result <<endl; return 0; }




Reply With Quote