This preview shows page 1. Sign up to view the full content.
Unformatted text preview: y2 = input('Enter the y-coordinate of the second point\n') %Calculate distance (d) d = sqrt( (x1-x2)^2 + (y1-y2)^2 ) %Display distance fprintf('The distance between the two points is %.3f',d)...
View Full Document
This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Spring '06 term at UC Davis.
- Spring '06