sophiecentaur
Science Advisor
Homework Helper
- 30,224
- 7,424
btb4198 said:I am not sure what you mean by "work out the answer 'properly"
What I meant was that the answer to your original question is obtainable in analytical form - giving an analytical expression that you could evaluate in one go and produce your output sample data. It strikes me that you are doing the processing the 'hard way' - and the code is letting you down. If you were dealing with an unspecified input then you would need to do it the 'DSP way' (as you are doing) but, as it's all internally generated, you should be able to calculate the final sample values in one straightforward evaluation.
How sure are you that the basic operation you are trying to do is valid and represents what you want to achieve?