BWindow

# BWindow - f function[a,b = BWindow(x,y,foundRoots x and y...

This preview shows pages 1–2. Sign up to view the full content.

function [a,b] = BWindow(x,y,foundRoots) f % x and y are row vectors having length n. % The components of x satisfy x(1) < . .. < x(n) % foundRoots is a row m-vector, possibly empty. % After closing all figure windows, this function opens up a new figure % window and % (a) Draws a bisection window based on x and y. % (b) Plots y versus x and the points (foundRoots(k),0), k=1:m. % (c) Solicits a mouseclick. % (d) Returns the x and y coordinates of the mouseclick in a and b. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Close All % Close any open figure windows C n = length(x); % x is a length n vector n m = length(foundRoots); % length of vector foundRoots is m m % Key Quantities. . % %%%%%%%%%%%%%%%% % xMin = x(1); % First element of x vector x xMax = x(n); % Last element of x vector x xInterval = xMax - xMin; x L = xMin + (1/4)*(xInterval); %L L R = xMin + (3/4)*(xInterval); %R R yMax = max(abs(y)); y yMin = -yMax; y delx = (xMax-xMin)/20; d

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

BWindow - f function[a,b = BWindow(x,y,foundRoots x and y...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online