

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


0 H
0 H
0 H
%% Problem 17.11: Chapra % The total force and line of action due to the wind force % on a skyscraper is computed using discrete data. %% --- input and examine data clc close all z = 0:30:240; % m F = [0 340 1200 1600 2700 3100 3200 3500 3800]; % N/m subplot(2,1,1), plot(z,F) xlabel('height, z (m)'), ylabel('F (N/m)') title('Wind force on a skyscraper') subplot(2,1,2), plot(z,z.F) xlabel('height, z (m)'), ylabel('zF (N)') %% --- total force F_total = trapData(z,F); fprintf('Total force = %8.0f N \n',F_total) %% --- line of action d = trapData(z,z.*F)/F_total; fprintf('Line of action = %6.1f m\n',d)
function I = trapData(x,f) % trapData: Trapezoid rule using discrete data % Syntax: I = trapData(data) % % Input: x , f = vectors containing data % % Output: I = approximate value of the integral if length(x) ~= length(f) error('x and y vectors must be the same length') end n = length(x); I = 0; for i = 1:n- I = I + ( f(i+1)+f(i) )/2*(x(i+1)-x(i)); end end
height, z (m) F (N/m) Wind force on a skyscraper 0 50 100 150 200 250
x 10 5 height, z (m) z*F (N)