hi, I have to write a function that gets values from a main programm and I have to return a smoothed value. this is what I thought it should be, but somehow the outcome isn't right. I think the outcome is just the inputvalue devided by the windowsize. can someone give me a hint where I went wrong and\or what I am overseeing, because I feel rather stuck...
I'm confused sorry mate.
None of this looks like mathematics to smooth a function.
Also this: arr[i]=value;
from the snippet you've shown you have not defined the variable value, so it's difficult to advise because of this.
Providing the input function is fairly "well-behaved" in the first place, you could look at bezier curves or cubic splines perhaps?
Unless I have completely misunderstood your question. Apologies if I have.
edit: Do you actually mean you want to find the average from a group of values? That's what line 23 suggests to me.