# Project1 - Miguel De Gracia 119481379 Project 1 CE 30...

This preview shows pages 1–3. Sign up to view the full content.

%% Miguel De Gracia. 119481379. Project 1. CE 30. % %% Problem 1 Code Setup % %1 member = [1:9]'; m Connectivity = [1 2 3 4; 3 4 5 6; 1 2 11 12; 3 4 11 12; 11 12 5 6;. .. 5 6 7 8; 7 8 9 10; 11 12 9 10; 11 12 7 8]; %2 dof = [1:12]'; d Coordinate = [0;0;3;2.4;5;4;7;2.4;10;0;5;1]; C displaytruss(Coordinate,Connectivity) d %3 Force = [0;0;0;30;0;20;0;10;0;0;0;0]; F %4 ConstrainedDOF = [1;2;10]; C %5 % Neqn = length(Force); Nmembers = length(member); N A = zeros(Neqn,Nmembers); A for k = 1:Nmembers x1=Coordinate(Connectivity(k,1)); x2=Coordinate(Connectivity(k,3)); y1=Coordinate(Connectivity(k,2)); y2=Coordinate(Connectivity(k,4)); L=sqrt((x2-x1)^2+(y2-y1)^2); A(Connectivity(k,1),k)=(x2-x1)/L; A(Connectivity(k,2),k)=(y2-y1)/L; A(Connectivity(k,3),k)=-(x2-x1)/L; A(Connectivity(k,4),k)=-(y2-y1)/L; end e disp(A) d for k = 1:length(ConstrainedDOF) A(ConstrainedDOF(k),k+Nmembers)=1; end e disp(A) d %the force along each bar b = A\Force b

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

View Full Document
b %% Problem 2 Assignment % %Problem 5.13 in book % %Truss
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/18/2010 for the course ENGINEERIN 7 taught by Professor Patzek during the Spring '08 term at Berkeley.

### Page1 / 3

Project1 - Miguel De Gracia 119481379 Project 1 CE 30...

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

View Full Document
Ask a homework question - tutors are online