{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

eval_vector - y Dependent variable Evaluate with vectors t...

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

View Full Document Right Arrow Icon
% Program eval_vector.m % % Purpose: % This program evaluates the function over % the range -3 to 3 in increments of .5, using vectors. % % Define variables: % ii -- Loop index % t -- Independent variable % test -- Logical array for masking
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % y -- Dependent variable % % Evaluate with vectors % t = -9:0.5:9; test = t > 0; y(test) = -3 * t(test).^2 + 5; y(~test) = 3 * t(~test).^2 + 5; fplot(t,y(test))...
View Full Document

{[ snackBarMessage ]}