Greetings,
I am trying to write a program that generates an array to be used in the excel to represent a sinewave signal. The signal should have the following characteristics:
Sampling Rate: 10000
Number of Samples: 2500
Amplitude: 170
Frequency: 60Hz
The image annexed in this post show how the program should works:
And here is the code that is not working as it should be... What is wrong with him?
Thanks,
FBorges22
I am trying to write a program that generates an array to be used in the excel to represent a sinewave signal. The signal should have the following characteristics:
Sampling Rate: 10000
Number of Samples: 2500
Amplitude: 170
Frequency: 60Hz
The image annexed in this post show how the program should works:
And here is the code that is not working as it should be... What is wrong with him?
Rich (BB code):
using System;
namespace Sinewave
{
class Program
{
static double[] data = new double [2500];
static void Main(string[] args)
{
for (int i = 0; i < 2500; i++)
{
data = 170 * Math.Sin(2 * Math.PI * 60 * i * 0.00004);
Console.WriteLine(data.ToString());
}
}
}
}
Thanks,
FBorges22
Attachments
-
7.3 KB Views: 81