% init.m % Used to enter RHS and IVP conditions for 1st order ODEs of the form % x' = f(t,x). Needed by SLOPEF.M, % SOL1.M, HW3PLOT.M, PLOTSLN.M N=20; ftx='2*t*x'; % Enter ODE as string variable; e.g., '2*t*x' initax=[1,4,-2,0]; % Enter axis ranges as vector; e.g., [1,4,-2,0] ax=initax; % Initialize working axis variable for axis(ax) % Sets t and x axes to ax-values axis(ax) % Sets axis to ax-values t=ax(1):(ax(2)-ax(1))/(N-1):ax(2); % Sets t-values for axis t0=1.0932; x0=0.95208; % Initial conditions obtained via experiment with sol1 % e.g., t0=1.0932;; x0=0.95208; C=0.28817; % Initialize constant of integration; e.g., C=0.28817; ftxsln='C*exp(t^2)'; % Enter hand-calculated solution as string variable % e.g., ftxsln='C*exp(t^2)';