plotDiffEqSol - b_str = num2str(b); eqn = strcat('Dy=-',...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function plotDiffEqSol(a, b) % Purpose: Plots values of the differential equation below, taking into % account the values of free variables "a" and "b" that are given as % input. % % Inputs: scalars a, b % Outputs: none a_str = num2str(a);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b_str = num2str(b); eqn = strcat('Dy=-', a_str, '*y'); const = strcat('y(0)=', b_str); result = dsolve(eqn, const); ezplot(result, [0, 10]); title(strcat('Plot of ', eqn, ' with y(t=0)=', b_str)); xlabel('t'); ylabel('y');...
View Full Document

This homework help was uploaded on 03/30/2008 for the course CSE 131 taught by Professor Sticklen during the Spring '08 term at Michigan State University.

Ask a homework question - tutors are online