MATLAB Command Window Page 1
Name: DEVASURYA D
Register Number: 2024214001
Division: Engineering Design
Department: Mechanical Engineering
Enter the functions for the system of ODEs:
f1(t, w, x, y, z): -x + y + 2*z
f2(t, w, x, y, z): w - 2*y
f3(t, w, x, y, z): w + 2*x + z
f4(t, w, x, y, z): w + x - y
Enter initial time t0: 0
Enter initial value w0: 1
Enter initial value x0: 0
Enter initial value y0: -1
Enter initial value z0: 2
Enter the time step size h: 0.1
Enter the final time tf: 1
t w x y z
0.0000 1.0000 0.0000 -1.0000 2.0000
0.1000 1.3233 0.2821 -0.6449 2.2133
0.2000 1.7065 0.5173 -0.1803 2.4468
0.3000 2.1689 0.6910 0.3915 2.6912
0.4000 2.7291 0.7909 1.0665 2.9379
0.5000 3.4049 0.8075 1.8394 3.1797
0.6000 4.2127 0.7343 2.7045 3.4108
0.7000 5.1682 0.5674 3.6560 3.6271
0.8000 6.2860 0.3056 4.6890 3.8263
0.9000 7.5800 -0.0502 5.7997 4.0078
1.0000 9.0636 -0.4970 6.9862 4.1730
>>