4 Pages

truss2d

Course: EML 4507, Fall 2010
School: University of Florida
Rating:
 
 
 
 
 

Word Count: 698

Document Preview

reads %truss2d.m data from an Excel file called 'truss2d_data.xls' % Worksheets in the xls file have the same name same as the data read clear all % The output is written to the file output.txt fid = fopen('output.m','w'); Nodes=xlsread('truss2d_data','Nodes'); Nelms=xlsread('truss2d_data','Nelms'); x=xlsread('truss2d_data','x'); NBC=xlsread('truss2d_data','NBC'); node=xlsread('truss2d_data','node');...

Register Now

Unformatted Document Excerpt

Coursehero >> Florida >> University of Florida >> EML 4507

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
reads %truss2d.m data from an Excel file called 'truss2d_data.xls' % Worksheets in the xls file have the same name same as the data read clear all % The output is written to the file output.txt fid = fopen('output.m','w'); Nodes=xlsread('truss2d_data','Nodes'); Nelms=xlsread('truss2d_data','Nelms'); x=xlsread('truss2d_data','x'); NBC=xlsread('truss2d_data','NBC'); node=xlsread('truss2d_data','node'); props=xlsread('truss2d_data','props'); force=xlsread('truss2d_data','force'); % Print number of nodes and elements fprintf(fid,'Number of nodes= %3i\n',Nodes); fprintf(fid,'Number of elements= %3i\n',Nelms); %Create array NN containg 1,2,3,..Nodes NN=[1:1:Nodes]; dprint=[NN',x,NBC]; fprintf(fid,'Node numbers, their coordinates and BCs are:\n'); fprintf(fid,'%3i %12.8f %12.8f %3i %3i\n',dprint'); %Create array MM containg 1,2,3,..Nelms MM=[1:1:Nelms]; %Augment [MM], [node] and [props] to form [pprint] pprint=[MM',node,props]; fprintf(fid,'Element number, first and second nodes, A and E of elements are:\n'); fprintf(fid,'%3i %3i %3i %11.4e %11.4e\n',pprint'); lprint=[NN',force]; fprintf(fid,'Node number, x-force and y-force:\n'); fprintf(fid,'%3i %11.4e %11.4e\n',lprint'); % NEQ = Number of equations in [K] = No. of active DOFs % First set NEQ=0 NEQ=0; for i=1:Nodes for j=1:2 if NBC(i,j)==1 NEQ=NEQ+1; NBC(i,j)=NEQ; end end end fprintf(fid,'Number of equations= %3i\n',NEQ); % Initialize [K] and {F} K=zeros(NEQ); F=zeros(NEQ,1); % Form {F} from the matrix [force] for i=1:Nodes for j=1:2 ID=NBC(i,j); if ID~=0 F(ID)=force(i,j); end end end % Compute [k] for each element and assemble [K] for e=1:Nelms for i=1:2 % Lv is the vector in the direction of the element Lv(i)=x(node(e,2),i)-x(node(e,1),i); end % L(e) is the length of Element e, which is %calculated as the norm of the vector {Lv} L(e)=norm(Lv); for i=1:2 % dc are the direction cosines %dc(e,1) is the direction cosine l of Element e %%dc(e,2) is the direction cosine m of Element e dc(e,i)=Lv(i)/L(e); %call end function stiff1.m to compute [k] for Element e [k]=stiff1(L(e),dc(e,:),props(e,:)); for m=1:2 for n=1:2 %scan each row of [k] lrow=(m-1)*2+n; % lrow is the local row number in [k] grow=NBC(node(e,m),n); % grow is the corresponding global row if grow~=0 % if grow=0 strike the row, do not assemble for i=1:2 for j=1:2 lcol=(i-1)*2+j; gcol=NBC(node(e,i),j); if gcol~=0 % if gcol=0 strike the column K(grow,gcol)=K(grow,gcol)+k(lrow,lcol); end end end end end end end % solve for{Q} Q=inv(K)*F; % Initialize the array u(i,j) of size Nodes x 2 u=zeros(Nodes,2); for i=1:Nodes for j=1:2 if NBC(i,j)~=0 u(i,j)=Q(NBC(i,j)); end end end for e=1:Nelms for i=1:2 del(i)=u(node(e,2),i)-u(node(e,1),i); end %del is a vector of relative displacements DeltaL=sum(dc(e,:).*del); % DeltaL is computed as the dot product of % del and direction cosines vector P(e,1)=props(e,1)*props(e,2)*DeltaL/L(e); end %Create array NN containg 1,2,3,..Nodes NN=[1:1:Nodes]; %Create array MM containing 1,2,3, ...Nelms MM=[1:1:Nelms]; %Augment [NN] and [u] to form [uprint] uprint=[NN',u]; %Augment [MM] and [P] to form [Pprint] Pprint=[MM',P]; % print displacements[uprint] fprintf(fid,'Nodal displacements:\n'); fprintf(fid,'%3i %11.4e %11.4e\n',uprint'); % Print element forces [Pprint] fprintf(fid,'Element forces:\n'); fprintf(fid,'%3i %11.4e\n',Pprint'); fclose(fid); mf=input('Enter a Magnification factor, usually close 10') zfactor=mf*min(L)/100/(norm(Q)/length(Q)); for e=1:Nelms for i=1:2 xp(i)=x(node(e,i),1); yp(i)=x(node(e,i),2); end plot(xp,yp) hold on end for e=1:Nelms for i=1:2 xp(i)=x(node(e,i),1)+u(node(e,i),1)*zfactor; yp(i)=x(node(e,i),2)+u(node(e,i),2)*zfactor; end plot(xp,yp,'r') hold on end
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

University of Florida - EML - 4507
3201100-101001012231.00E-04 1.00E+111.00E-04 1.00E+11010000020000
University of Florida - EML - 4507
%truss3d.m reads data from an Excel file called 'truss3d_data.xls'% Worksheets in the xls file have the same name same as the data read clear all% The output is written to the file output.txtfid = fopen('output.m','w');Nodes=xlsread('truss3d_data','N
University of Florida - EML - 4507
8181100110001100110111100001111001111110111111100001234567812341524132341678556783775681.00E-041.00E-041.00E-041.00E-041.00E-041.00E-041.00E-041.00E-041.00E-041
University of Florida - EGM - 6365
Constrained Optimization5Most problems in structural optimization must be formulated as constrained minimization problems. In a typical structural design problem the objective functionis a fairly simple function of the design variables (e.g., weight),
University of Florida - EGM - 6365
Chapter 5: Constrained Optimization5.5 Gradient Projection and Reduced Gradient MethodsRosens gradient projection method is based on projecting the search direction intothe subspace tangent to the active constraints. Let us rst examine the method fort
University of Florida - EGM - 6365
Educational articleStruct Multidisc Optim 21, 120127 Springer-Verlag 2001A 99 line topology optimization code written in MatlabO. SigmundAbstract The paper presents a compact Matlab implementation of a topology optimization code for compliance minimiz
University of Florida - EGM - 6365
University of Florida - EGM - 6365
EGM6365 Homework #21. Consider the following design optimization problem:Minimize2f (x) = x12 + x2 4 x1 + 4Subject tog1 (x) = x1 0g 2 ( x) = x2 0g3 (x) = x2 (1 x1 )3 0(i)(ii)Find the optimum point graphicallyShow that the optimum point does no
University of Florida - EGM - 6365
EGM6365 Homework #31. A linear programming problem is given asMaximizef = 2 x1 + 5 x2Subject to3 x1 + 2 x2 122 x1 + 3x2 6(1)x1 0, x2 unrestricted(i)(ii)Solve Eq. (1) using MATLAB.Convert Eq. (1) into the standard form and solve the standards p
University of Florida - EGM - 6365
EGM6365 Homework#41. Make a Matlab script to solve the following unconstrained optimization problem usinga Newton method.Minimizef ( x) = 1 + 2( x + 1)2 x 3 + e xUse the initial point x = 6 and -6. The iteration should stop when the function gradient
University of Florida - EGM - 6365
EGM6365 Homework #11. A beer can is supposed to hold at least specific amount of beer and meet other designrequirements. The can will be produced in billions, so it is desirable to minimize the costof manufacturing them. Since the cost can be related d
University of Florida - EGM - 6365
EGM6365 Homework #21. Consider the following design optimization problem:Minimize2f (x) = x12 + x2 4 x1 + 4Subject tog1 (x) = x1 0g 2 ( x) = x2 0g3 (x) = x2 (1 x1 )3 0(i)(ii)Find the optimum point graphicallyShow that the optimum point does no
University of Florida - EGM - 6365
EGM6365 Homework #31. A linear programming problem is given asMaximizef = 2 x1 + 5 x2Subject to3 x1 + 2 x2 122 x1 + 3x2 6(1)x1 0, x2 unrestricted(i)(ii)Solve Eq. (1) using MATLAB.Convert Eq. (1) into the standard form and solve the standards p
University of Florida - EGM - 6365
EGM6365 Homework#41. Make a Matlab script to solve the following unconstrained optimization problem usinga Newton method.Minimizef ( x) = 1 + 2( x + 1)2 x 3 + e xUse the initial point x = 6 and -6. The iteration should stop when the function gradient
University of Florida - EGM - 6365
EGM6365 Homework #51. Find the optimum solution of the following constrained problemMinimize222f = x12 + x2 + 2 x3 x4 5 x1 5 x2 21x3 + 7 x4 + 100Subject to222g1 = x12 + x2 + x3 + x4 + x1 x2 + x3 x4 8 0222g 2 = x12 + 2 x2 + x3 + 2 x4 x1 x4 1
University of Florida - EGM - 6365
EGM6365 Project #1 Optimization of Space StructureA space frame structure as shown in the figure consists of 25 truss members. Initially, allmembers have the same circular cross-sections with diameter d = 2.0 in. At nodes 1 and 2,a constant force F = 6
DeVry Chicago O'Hare - LAW - 31
December 11, 2009To My Students-to-Be,My name is Diane Scrofano, and I am your professor for CRN 31196, English M01AOnline, Spring 2010. This is an accelerated, 8-week course, taking place fromJanuary 11 to March 5, 2010 .Before I go into the formali
Riverside Community College - ACCOUNTING - 1b
Use the following selected account balances from the financial statements of theWashington Company to answer Questions 68 and 69:Accounts Receivable, Jan. 1 $13,000Accounts Receivable, Dec. 31 9,000Accounts Payable, Jan 1 4,000Accounts payable Dec. 3
Adelphi - THEATRE - 0192-100-0
AN ACTORS WORK NOTESIntroductionThe dog always knew when rehearsal was about to end, because the actors started talkinglike regular people. The difference between the fake and the living is as sharp as Pavlovsbell.Stanislavskis absolute priority was
Adelphi - THEATRE - 0192-100-0
AN ACTORS WORK NOTESChapter Four ImaginationThe actors task is to transform the story of the play into theatrical fact. (60)Imagination creates what is, what exists, what we know, but fantasy creates what isntwhat we dont know, what never was and neve
Adelphi - THEATRE - 0192-100-0
AN ACTORS WORK NOTES(Chapters 7-9)Chapter 7 Bits and TasksA play much like a turkey cannot be taken in one go. You must cut it down intosmaller pieces in order to better understand, interpret and portray. (136)The actor must go by the larger, most im
Adelphi - ENG - 264
Professor PassaroThe Tragic Vision26 January 2010TragedyThe definition of the term Tragedy as it relates to dramaturgy and literature isone that has changed throughout the history of man. When looking for a classicaldefinition, most refer to Aristot
Adelphi - ENG - 264
The Tragic VisionProfessor V. PassaroThe Post-Vietnam War FilmThe Tragic Vision and by extension, its curriculum - has lead me to watch and read a variety of filmsand novels set in the 1960s and 70s. These years were undeniably a time riddled with par
Adelphi - ENG - 264
Theatre History IIProfessor Brian RoseTragedy: Poor, Misunderstood Tragedy.Oedipus. The mere mention of the name brings up all manner of conversation aboutpsychology ala Freud, about the nature of human existence, and makes one ask; what isthat bring
Adelphi - SOC - 101
Intro. To SociologyProfessor Karmen8 March 2010Sociology Take Home EssayChapter 2 The AmishThe Amish are distinguishable from mainstream society - a subculture - in many ways. First and most obviously the small villages and towns in which they live
Adelphi - SOC - 101
Sociology 101Professor KarmenQuestions Surround a Delay in Help for a Dying Man1) Publication: The New York TimesDate Published: April 26th, 2010Page Number: A202) What were the main themes?According to police reports, a homeless man lay either dea
Adelphi - SOC - 101
Sociology 101Prof. KarmenSocial Mobility in the United States (Myth vs. Fact)In order to discern what is true or untrue about the concept of Social Mobility, one mustfirst define the term. According to the Seeing Sociology textbook, social mobility is
Adelphi - SOC - 101
Sociology 101Professor KarmenAfter Long Decline, Teenage Pregnancy Rate Rises1) Publication: The New York Times.Date Published: January 26th, 2010Page Number: A142) What were the main themes?After decades of declining pregnancy rates, there has bee
Adelphi - THEATRE - 0192-210-0
History of TheatreProf. Brian Rose29 December 2010Commedia Dell Arte & The BardShakespeare is without a doubt one of the most famous men of all time. His works have beentranslated into every currently living language, and are commonly used for litera
Adelphi - THEATRE - 0192-210-0
Playwrights-Hrosvita of Gandershine began writing plays around 1000, and is famously thefirst renowned female playwright, she took Seneca and thus her plays were awful.Shakespeare and Marlowe were both born in 1564.First theatre-only stage ever built
Adelphi - POLI - 0158-212-0
Environment and PoliticsProf. R. Axelrod9 October 2010Fresh Water Availability: Comparing the United States and ChinaIts a bit unorthodox to start a paper with a quote, but this one says it all: Water,water, everywhere, but not a drop to drink. This
Adelphi - POLI - 0158-212-0
Environment and PoliticsProf. Karmen29 November 2010NGO: Renewable Energy Long IslandThe local NGO known as RELI is a non-profit organization in favor of theestablishment and protection of all alternative energy sources. Their goal is to open upas m
Adelphi - POLI - 0125-560-0
Joshua MintonIEPProfessor AxelrodNon-Legally Binding Treaty on All Types of ForestsQuickTime and adecompressorare needed to see this picture.The world today is dangerous- more so than wecould possibly imagine, or even care to admit. Itsnot as if
Adelphi - PHILOSOPHY - 0154-105-0
Critical Thinking: Analysis of Everyday ThoughtProf. MattickPlanned Parenthood Editorial AnalysisSimplifying the Argument:Gail Collins obscures the main point of opposition to federal funding for plannedparenthood by stating that doctrinaire (in her
Adelphi - PHILOSOPHY - 0154-105-0
The Analysis of Arguments in Everyday ThoughtProf. Paul MattickJohn Arquilla and Fogelson-Lubliner are right that the Pentagon budget needs to becut for the health and safety of this nation. Spending $700 billion a year on defense whilecutting program
Adelphi - PHILOSOPHY - 0154-105-0
What is an Argument?1) What is an argument, as we have been using the term in this course? What arethe two main kinds of argument?An argument, as per the course, is a series of premises stated in a (hopefully) logicalorder that leads to a conclusive s
University of Phoenix - HEALTH ADM - HCA 250
Axia College MaterialAppendix CStress, Health, and Everything in BetweenAs you complete this appendix, you will investigate a few factors that affect how stress influencesindividuals health.Read both case studies and answer the following questions:C
University of Phoenix - COMM 102 - 102 week 2
I think that the writer did a great job persuading me on his topic; he explained how he is againstphysician- assisted suicide. I like the fact the he uses his own personal story to explain why he thinks thatit is better to pass away on a persons own ins
University of Phoenix - ACC/230 - ACC/230
Running head: CHECKPOINT: FINANCIAL MANAGEMENT GOALS1Checkpoint: Financial Management Goals Nikki Vergets Fin/200 3/31/2011 John SimulcikCHECKPOINT: FINANCIAL MANAGEMENT GOALS Checkpoint: Financial Management Goals A very important part of a corporatio
University of Phoenix - ETH 125 - ETH 125
Running head: ASSIGNMENT: HISPANIC AMERICAN DIVERSITYAssignment: Hispanic American DiversityNikki VergetsEth/1255/15/2011Cornelius Brownlee1ASSIGNMENT: HISPANIC AMERICANDIVERSITY2Assignment: Hispanic American DiversityThere is a vast amount of
University of Phoenix - ACC 220 - ACC 220
Running head: ASSIGNMENT: LOAN SCENARIOS1Assignment: Loan Scenarios Nikki Vergets FIN/200 5/15/2011 John SimulcikASSIGNMENT: LOAN SCENARIOS Assignment: Loan Scenarios Gordon Co. is negotiating a loan from Manhattan Bank and Trust. The small chemical co
University of Phoenix - ACC 220 - ACC 220
Running head: CHECKPOINT: LONG-TERM AND SHORT-TERM FINANCINGCheckpoint: Long-Term and Short-term FinancingNikki VergetsFin/2004/28/2011John Simulcik1CHECKPOINT: LONG-TERM AND SHORTTERM FINANCING2Checkpoint: Long-Term and Short-term FinancingLong
University of Phoenix - ETH 125 - ETH 125
CHECKPOINT: MODERN CHALLENGES IN IMMIGRATIONCheckpoint: Modern Challenges in ImmigrationNikki VergetsEth/1254/14/2011Cornelius Brownlee1CHECKPOINT: MODERN CHALLENGESIN IMMIGRATION2Checkpoint: Modern Challenges in ImmigrationShould United States
University of Phoenix - ETH 125 - ETH 125
Running head: ASSIGNMENT: ETHNIC GROUPS AND DISCRIMINATIONAssignment: Ethnic Groups and DiscriminationNikki VergetsEth/1254/17/2011Cornelius Brownlee1ASSIGNMENT: ETHNIC GROUPS ANDDISCRIMINATION2Assignment: Ethnic Groups and DiscriminationOne of
University of Phoenix - FIN 200 - fin200
Running head: CHECKPOINT: TIME VALUE OF MONEYCheck Point: Time Value of MoneyNikki VergetsFin/2005/19/2011John Simulcik1CHECKPOINT: TIME VALUE OF MONEY2Check Point: Time Value of MoneyThere are four different concepts for time value money presen
University of Phoenix - FIN 200 - fin200
1Check Point: A new companyCheck Point: A new companyNikki VergetsAcc/22012/13/10Eric Weitner2You have been hired into a new company to oversee the accountingdepartment. What type of financial reports would you expect to see in yourdepartment? H
University of Phoenix - ACC 230 - acc 230
1Accounting Check Point: Debits and CreditsNikki VergetsAcc/2252/3/2011Julie Goodin2Quick Study:QS 2-3,Indicate whether a debit or credit decreases the normal balance of each of the followingaccounts:A. Office supplies are considered a debit.B
University of Phoenix - FIN 200 - fin 200
Running head: CAPSTONE CHECKPOINT: PRESENT VALUE, FUTURE VALUE,Capstone Checkpoint: Present Value, Future Value, and AnnuityNikki VergetsFin/2005/26/11John Simulcik1CAPSTONE CHECKPOINT: PRESENTVALUE, FUTURE VAULE,2Capstone Checkpoint: Present Va
University of Phoenix - FIN 200 - fin 200
1Compare and Contrast:Proprietorships, Partnerships and Corporations2There are many differences between a sole proprietorship, partnership or, corporation. Asole proprietorship is a business owned by one person, a partnership is a business ownedby m
University of Phoenix - FIN 200 - fin 200
Running head: FINANCIAL FORCASTINGFinancial ForecastingNikki VergetsFIN/2004/14/2011John Simulcik1FINANCIAL FORCASTING2Financial ForecastingWith a new company I dont think that there would be very much historical value because ithasnt been arou
University of Phoenix - FIN 200 - fin 200
Financial StatementsFinancial StatementsNikki VergetsAcc/22011/21/10Eric WeitnerThere are many forms of statements when maintaining a company; a balancesheet is one of the major financial statements used by accountants and business owners.A balanc
University of Phoenix - FIN 200 - fin 200
What are some future consequences of borrowing too much debt?Some of the consequences are not being able to get a home or car, it will be hard to get another studentloan if you try and go back to school. If you get too far they can also send a request t
University of Phoenix - COMM 220 - AAGHOPX9V3
Music has become more than just a form of entertainment over the years. It has become an art form forpeople to express themselves and has even spread into other forms of the media. Lately, music videos,dancing, and the Internet have all had an influence
University of Phoenix - COMM 220 - AAGHOPX9V3
Saddleback - BIO - 104
A.P. Biology: Chapter 12 & 13 Test1. The centromere is a region in which a. chromatids are attached to one another. b. metaphase chromosomes become aligned. c. chromosomes are grouped during telophase. d. the nucleus is located prior to mitosis. e. new s
Saddleback - BIO - 104
Biology, 7e (Campbell)Chapter 12: The Cell CycleChapter Questions1) The centromere is a region in which A) chromatids are attached to one another. B) metaphase chromosomes become aligned. C) chromosomes are grouped during telophase. D) the nucleus is l
Saddleback - BIO - 104
Biology,8e(Campbell) Chapter131Meiosisand SexualLife Cycles Multiple-ChoiceQuestions1)Whatisa genome? A)Thecomplete complementofanorganism'sgenes B)Aspecificsetof polypeptideswithineachcell C)Aspecialized polymeroffourdifferentkindsofmonomers D)As
Saddleback - BIO - 104
Chapter151The Chromosom alBasisof Inheritance1)2When Thomas HuntMorgancrossedhisred-eyedF1generationfliestoeachother,theF2generationincludedbothred-and white-eyedflies.Remarkably,allthewhite-eyedfliesweremale.Whatwastheexplanationforthis result? A)
Saddleback - BIO - 104
1. Explain how a nucleoside triphosphate is added to a growing polymer of DNA. Specifically, where do the new nucleotides attach & in what direction is the chain synthesized The replication process begins somewhere in the middle of the DNA molecule, at pl
Saddleback - BIO - 104
Biology, 8e (Campbell) Chapter 20 Biotechnology Multiple-Choice QuestionsFigure 20.1 1) Which enzyme was used to produce the molecule in Figure 20.1? A) ligase B) transcriptase C) a restriction enzyme D) RNA polymerase E) DNA polymerase 2) Assume that yo
Saddleback - BIO - 104
Biology, 8e (Campbell) Chapter 20 Biotechnology Multiple-Choice Questions 1) If you discovered a bacterial cell that contained no restriction enzymes, which of the following would you expect to happen? D) The cell would be easily infected and lysed by bac