// // Created by minhd on 03.12.2024. // #include "MMS24_25.h" #include "math.h" #include #include double interpolateLine(double x1, double y1,double x2, double y2, double x){ double y = ((y2 - y1) / (x2 - x1)) * x + y1 - ((y2 - y1) / (x2 - x1)) * x1; return y; } void rescaleDoubleArray(double *pdIn, int iLen, int iMin, double dFactor, double *pdOut){ for (int i = 0; i < iLen; i++) { pdOut[i] = pdIn[i + iMin] * dFactor; } } double *generateSineValues(int iNumValues, int iNumSamplesPerPeriod, double dAmp){ double* sineArray = (double*)malloc(iNumValues * sizeof(double)); for (int i=0; i