#include #include "temperature_drift.h" #include #include #include #include int main() { temperature_drift algorithm; algorithm.set_config( { {"TEMPERATURE_DRIFT_AMPLITUDE", 0.01}, {"TEMPERATURE_DRIFT_AMPLITUDE_BASE", 10} } ); std::vector > user_arr; std::ifstream fp("C:/data/user_data.csv"); std::string line; getline(fp,line); while (getline(fp,line)){ std::vector data_line; std::string number; std::istringstream readstr(line); for(int j = 0;j < 2814;j++){ getline(readstr,number,','); data_line.push_back(atof(number.c_str())); } user_arr.push_back(data_line); } std::ofstream outfile; outfile.open("C:/data/user_data7.csv", std::ios::out); outfile<<"origin"<<','<<"temperature_drift"< x(100); // std::generate(x.begin(), x.end(), []() { // static int i = 0; // return i++; // }); // std::vector virtual_data(100, 100.0); // std::vector temperature_drift_data; // sciplot::Plot plot; // // for (auto iter: virtual_data) { // temperature_drift_data.push_back(algorithm.eval(iter)); // } // // plot.drawCurve(x, virtual_data).label("org"); // plot.drawCurve(x, temperature_drift_data).label("td"); // plot.show(); // // return 0; //} //#include //using namespace sciplot; // //int main(int argc, char** argv) //{ // // Create values for your x-axis // Vec x = linspace(0.0, 5.0, 100); // // // Create a Plot object // Plot plot; // // // Set color palette // plot.palette("set2"); // // // Draw a sine graph putting x on the x-axis and sin(x) on the y-axis // plot.drawCurve(x, std::sin(x)).label("sin(x)").lineWidth(4); // // // Draw a cosine graph putting x on the x-axis and cos(x) on the y-axis // plot.drawCurve(x, std::cos(x)).label("cos(x)").lineWidth(4); // // // Show the plot in a pop-up window // plot.show(); // // // Save the plot to a PDF file // plot.save("plot.pdf"); //}