I am frankly a novice to Java. I have a project that i am working on where I want to find a way to create a polynomial function based on a sequence of numbers.
Anyway, my question is that i have created an array that has stored a sequence. I would like to now find the difference between the elements. So for example. i want to find this calculation a[2] - a[1] and then store accordingly into another array.
What i have already done is this. I am not too confident about this but mostly am having a problem storing each into another array. I am sure this is a bit of a stupid question however, I would appreciate any help possible.
for(int i = 0;i<=sequence.length;i++){
double diff = sequence[i+1]- sequence[i];
}