dynamics_prob6_script

dynamics_prob6_script - % Clean up the environment close...

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

View Full Document Right Arrow Icon
% Clean up the environment close all clear all % Constants rad2deg = 180/pi; deg2rad = pi/180; % Set the time vector start_time = 0; stop_time = 10; time_step = 0.01; time_vec = start_time:time_step:stop_time; % Force and torque values on_force_val = 10; on_torque_val = 3; % Buid the force and torque vectors as functions of time x_forcev = zeros(size(time_vec)); y_forcev = zeros(size(time_vec)); torquev = zeros(size(time_vec)); for i = 1:length(time_vec) if (time_vec(i) >= 7) x_forcev(i) = x_forcev(i) + on_force_val; end if (time_vec(i) <= 3) x_forcev(i) = x_forcev(i) - on_force_val; end torquev(i) = torquev(i) + on_torque_val; end if (time_vec(i) >= 6) torquev(i) = torquev(i) - on_torque_val; end if (time_vec(i) <= 4) y_forcev(i) = y_forcev(i) - on_force_val; end if (time_vec(i) >= 8) y_forcev(i) = y_forcev(i) + on_force_val; end end % Format the forces and torques for use with the source block torque = [time_vec' torquev']; x_force = [time_vec' x_forcev'];
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/07/2011 for the course AERO 16.410 taught by Professor Brianwilliams during the Fall '05 term at MIT.

Page1 / 2

dynamics_prob6_script - % Clean up the environment close...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online