{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

area1 - end e fprintf'The area of the function between 0...

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

View Full Document Right Arrow Icon
%Find area under y = x^2 clear; total=0; intv = 0.00001; i x = 0:intv:1; x y = x.^2; y for i = 1 : length(x) -1 total = total + intv * y(i);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: end e fprintf('The area of the function between 0 and 1 is %.2f.\n', total);...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online