s144x14

# s144x14 - fprintf T Min T Max Y Min Y Max Average...

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

delete s144x14.txt; diary s144x14.txt clear all; clc; close all; echo on % % Stewart 144/14 % %The displacement (in meters) of a particle moving in a strait line is %given by s=t^2-8*t+18, where t is measured in seconds. % %----A) find the average velocitys over the following time intervals:---- % Initial_t=[3, 3.5, 4, 4]; Final_t=[4, 4, 5, 4.5]; % Change_time=Final_t-Initial_t; % Displacement_1=(Initial_t.^2)-8.*Initial_t+18; % Displacement_2=(Final_t.^2)-8.*Final_t+18; % Displacement=Displacement_2-Displacement_1; % avg_vel=Displacement./Change_time; % echo off table=[Initial_t' Final_t' Displacement_1' Displacement_2' avg_vel'];
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fprintf(' T Min T Max Y Min Y Max Average Velocity\n'); fprintf(' sec. sec. meters meters meters per sec.\n') fprintf('------------------------------------------------------------------------------------------\n') fprintf('%6.1f %6.1f %6.1f %6.1f %6.1f\n',table') % echo on % %-------------------A) find the instantaneous velocity at time 4:--------------------------% syms t % Instantanious=diff((t^2)-8*t+18,t) % t=4 % %Displacement_4=eval(Displacement) %Instant_Velocity=Displacement_4/time % echo off; diary off...
View Full Document

Ask a homework question - tutors are online