No BSD License  

Highlights from
Alternative Mathematics using MATLAB 7

image thumbnail

Alternative Mathematics using MATLAB 7

by

 

13 Mar 2003 (Updated )

Self-instructive text on undergraduate algebra, statistics, differential and integral calculus.

ex192.m
% ex192.m:  Euler's Numerical Solution for dy/dx=-y				        
clear all
F=inline('-Y', 'X', 'Y');
X(1)=input('x1=  (e.g. 0) ');  Y(1)=input('y1=  (e.g. 3) ');
n=400;  h=0.01;
for i=1:n
   dy= F( X(i), Y(i))*h;
   X(i+1)=X(i)+h;
   Y(i+1)=Y(i)+dy;
end
figure(1),  plot(X,Y, 'r'),  grid on,  axis([0 n*h 0 3])	

Contact us