This preview shows page 1. Sign up to view the full content.
Unformatted text preview: dsand = 3.25 ./ cos(radians) dtrail = 9 - 3.25 .* tan(radians) %Time in hours = distance in sand / 2 + distance on trail / 3.5 t = dsand ./ 2 + dtrail ./ 3.5 %Convert time to hours and minutes hours = floor(t) minutes = 60 * (t - hours) %Transpose hours and minutes and create info array for print statement hours = hours' minutes = minutes' info(1,:) = theta info(2,:) = hours info(3,:) = minutes %Display results fprintf('For theta = %.0f degrees, time to camp = %.0f hr. and %.0f min.\n', info)...
View Full Document
- Spring '06