Why hello there!
Three days ago I started relearning C++ at work as a large section of my work will entail interfacing with PCs via I/O cards, mostly preforming signal analysis. I have got all the basic commands down I belive, such as for loops, ifs, and am comfident with most of the operators.
My boss has decided that as I am fairly competent i should learn "to do somthing useful." he wants me to first produce a sine wave then draw this using Timage. this was fairly simple and i got it completed in about an hour. Next i need to preform a Fast Fourier Transform on the sine wave and draw the output from this using Timage. Once i have got that completed he wants me to draw a cosine wave using Timage, then preform a Discrete Fourier Transform on the cosine wave and draw the output again with Timage.
I tried some existing code that another member of the team at work has used but I cant get it to work. My boss said that the manner in which i produced the sine wave is wrong, the code I used is:
for(int i=0;i<points;i++)
{
sinearray[i]= sin(Pi/180*i);
}
is there a better way to generate a sine wave? i am using Borland Turbo C++ and so have to work in radians. any help with any of the above tasks would be greatly apreciated.
many thanks pigeon
