I saw there are a lot of articles about memcpy but I can't find the solution for my problem. Can somebody see why the copy action doesn't work?
float MeanFilter(const volatile float *Array, volatile float Dist){
float Avg = 0.0; // Variable used to calculate the average distance value
float Sorted[MaxDistArray]; // Array used to contain the sorted array
printf("\n");
int j;
for(j = 0; j < 20; j++){
if(j == 10) printf("\n \t");
printf("%d: %f, ", j+1, Array[j]);
}
memcpy(Sorted, &Array[0], sizeof(float));
Sort(Sorted); // Sort the array of distances values
printf("\n");
for(j = 0; j < 20; j++){
if(j == 10) printf("\n \t");
printf("%d: %f, ", j+1, Sorted[j]);
}