.


:




:

































 

 

 

 


Wyhod(m, n, t0, t1, h, s1, w, amplituda, path, v);




2. n ,

3. m ,

4. t0, t1 ,

5. h ,

6. s1 ,

7. amplituda - ( ),

8. path[30] - , , d:/user/out.txt,

9. float v[600][4] - :

- ,

- ,

- ,

- ,

( ) :

((t1-t0)/h)/s1+1

10. w[2][n+1] :

,

,

11. w [2][n+1],

12. float input(float t), ,

Float input(float t)

{

Float f;

f=1.0; //

Return f;

}

13. :

Wyhod(m, n, t0, t1, h, s1, w, amplituda, path, v);

: , :

W(p)=(p + 20) / (p4 + 5p3 + 10p2 + 15p + 20)

n=4, m=1, t0=0, t1=4, h=0.02, s1=5,

w[2][5] = 20 1 0 0 0

20 15 10 5 1

:

#include <stdio.h>

#include <math.h>

#include <conio.h>

void wyhod(int m, int n, float t0, float t1, float h, int s1, float w[2][n+1], int amplituda, char path[], float v[][4]);

int main(int argc, char **argv)

{

int m; //

int n; //

float t0, t1; //

float h; //

int s1; //

//

char path[30]; //

// , , d:/user/out.txt

int amplituda; //

// ( )

float v[600][4]; // :

// - ,

// - ,

// - ,

// - ,

// :

// ((t1-t0)/h)/s1+1

int i; //

Char c0;

printf("\nStepeny polinoma chislit. m= ");

scanf("%d", &m);

printf("\nStepeny polinoma znamenat. n= ");

scanf("%d", &n);

float w[2][n+1]; //

//

//

printf("\nNachal. vremja integrir. t0= ");

scanf("%f", &t0);

printf("\nKonech. vremja integrir. t1= ");

scanf("%f", &t1);

printf("\nShag integrir. h= ");

scanf("%f", &h);

printf("\nKol-vo shagov na odin vyvod s1= ");

scanf("%d", &s1);

printf("\nAmplituda grafikov amplituda= ");

scanf("%d", &amplituda);

printf("\nPuty k vyhod. failu:\n");

scanf("%s", path);

printf("\nVvedite koeff. chislit. pered. funkcii (%d znacheniy):\n", n+1);

for (i=0; i<=n; i++)

scanf("%f", &w[0][i]);

printf("\nVvedite koeff. znamenat. pered. funkcii (%d znacheniy):\n", n+1);

for (i=0; i<=n; i++)

scanf("%f", &w[1][i]);

Wyhod(m, n, t0, t1, h, s1, w, amplituda, path, v);

c0=getch();

Return 0;

}

:

, :

------------------------------------------------

t x dx/dt d2x/dt2 input

* 1 2 +

------------------------------------------------

0.000000 0.00000 0.00000 0.00000 1.00000

0.100000 0.00022 0.00717 0.16186 1.00000

0.200000 0.00213 0.03497 0.40230 1.00000

0.300000 0.00808 0.08845 0.66787 1.00000

0.400000 0.02069 0.16810 0.92056 1.00000

0.500000 0.04248 0.27125 1.13425 1.00000

0.600000 0.07557 0.39308 1.29198 1.00000

0.700000 0.12152 0.52745 1.38391 1.00000

0.800000 0.18125 0.66752 1.40579 1.00000

0.900000 0.25498 0.80627 1.35771 1.00000

1.000000 0.34223 0.93684 1.24321 1.00000

1.100000 0.44186 1.05290 1.06850 1.00000

1.199999 0.55213 1.14881 0.84186 1.00000

1.299999 0.67079 1.21987 0.57309 1.00000

1.399999 0.79516 1.26239 0.27307 1.00000

1.499999 0.92223 1.27382 -0.04671 1.00000

1.599999 1.04884 1.25278 -0.37447 1.00000

1.699999 1.17170 1.19905 -0.69859 1.00000

1.799999 1.28759 1.11356 -1.00785 1.00000

1.899999 1.39342 0.99832 -1.29183 1.00000

1.999999 1.48636 0.85635 -1.54111 1.00000

2.099999 1.56392 0.69153 -1.74758 1.00000

2.199999 1.62406 0.50849 -1.90458 1.00000

2.299999 1.66519 0.31243 -2.00713 1.00000

2.399998 1.68630 0.10899 -2.05197 1.00000

2.499998 1.68693 -0.09599 -2.03770 1.00000

2.599998 1.66724 -0.29659 -1.96471 1.00000

2.699998 1.62795 -0.48705 -1.83524 1.00000

2.799998 1.57036 -0.66189 -1.65318 1.00000

2.899998 1.49627 -0.81611 -1.42403 1.00000

2.999998 1.40797 -0.94535 -1.15466 1.00000

3.099998 1.30815 -1.04597 -0.85314 1.00000

3.199998 1.19982 -1.11520 -0.52842 1.00000

3.299998 1.08622 -1.15120 -0.19015 1.00000

3.399997 0.97072 -1.15311 0.15170 1.00000

3.499997 0.85673 -1.12108 0.48708 1.00000

3.599997 0.74760 -1.05624 0.80619 1.00000

3.699997 0.64650 -0.96069 1.09976 1.00000

3.799997 0.55638 -0.83743 1.35929 1.00000

3.899997 0.47982 -0.69022 1.57737 1.00000

3.999997 0.41899 -0.52354 1.74781 1.00000

---------------------------------------------------------------------------

| t | g r a p h i c s

---------------------------------------------------------------------------

| 0.000000 |*+ 1 2

| 0.100000 |*+ 1 2

| 0.200000 |*+ 1 2

| 0.300000 |*+ 1 2

| 0.400000 |*+ 1 2

| 0.500000 |+* 1 2

| 0.600000 |+ * 1 2

| 0.700000 |+ * 1 2

| 0.800000 |+ * 1 2

| 0.900000 |+ * 1 2

| 1.000000 |+ * 12

| 1.100000 |+ * 2 1

| 1.200000 |+ * 2 1

| 1.300000 |+ * 2 1

| 1.400000 |+ * 2 1

| 1.500000 |+ 2* 1

| 1.600000 |+ 2 * 1

| 1.700000 |+ 2 * 1

| 1.800000 |+ 2 * 1

| 1.900000 |+ 2 * 1

| 2.000000 |+ 2 1 *

| 2.100000 |+ 2 1 *

| 2.200000 |+ 2 1 *

| 2.300000 |2+ 1 *

| 2.400000 |2+ 1 *

| 2.500000 |2+ 1 *

| 2.600000 |+2 1 *

| 2.700000 |+ 2 1 *

| 2.799999 |+ 2 1 *

| 2.899999 |+ 12 *

| 2.999999 |+ 1 2 *

| 3.099999 |+ 1 2 *

| 3.199999 |1+ 2 *

| 3.299999 |1+ 2 *

| 3.399999 |1+ 2*

| 3.499999 |1+ * 2

| 3.599999 |+ 1 * 2

| 3.699999 |+ 1 * 2

| 3.799999 |+ 1 * 2

| 3.899998 |+ 1 * 2

| 3.999998 |+ *1 2

, :

+ ,

* ,

1 ,

2 .

 

-

:

1. :





:


: 2017-03-11; !; : 275 |


:

:

: , .
==> ...

1366 - | 1315 -


© 2015-2024 lektsii.org - -

: 0.047 .