upd
This commit is contained in:
9
labs/lab1/scripts/2_4/2_4.m
Normal file
9
labs/lab1/scripts/2_4/2_4.m
Normal file
@@ -0,0 +1,9 @@
|
||||
lambda = 2000;
|
||||
f = @(t,y) -lambda*y + t;
|
||||
y0 = 0;
|
||||
tspan = [0 1];
|
||||
opts = odeset('RelTol',1e-12,'AbsTol',1e-14);
|
||||
[t2,y2] = ode15s(f,tspan,y0,opts);
|
||||
plot(t2,y2)
|
||||
print -dpng "plot.png"
|
||||
|
||||
BIN
labs/lab1/scripts/2_4/plot.png
Normal file
BIN
labs/lab1/scripts/2_4/plot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in New Issue
Block a user