Longge-Kuta method

zhaozj2021-02-16  55

#include #include / * n Represents a few points, n 1 indicates a number of outputs * / int Rungekutta (Double Y0, Double A, Double B, INT N, DOUBLE * X, Double * Y, int Style, Double (* function) {double h = (ba) / n, k1, k2, k3, k4; int i; // x = (double *) malloc ((N 1) * sizeof (double)); // y = (double *) malloc ((N 1) * sizeof (double)); x [0] = a; y [0] = Y0; switch (style) {case 2: for (i = 0; i

转载请注明原文地址:https://www.9cbs.com/read-25784.html

New Post(0)