Statics Notes Day 4

# Statics Notes Day 4 - &amp;amp;gt;&amp;amp;gt; y = Eq(ang)...

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

9/1/11 70 o 250 N A 250 N force is to be resolved into two oblique components A and B along lines a- a and b-b, respectively . If A is 160N, determine the angle β and the component B along b-b. a a b b A B 25 0 7 0 11 0 16 0 B but s o Transcendental equation We can solve this equation by taking the sin β term to the right and squaring both sides. This will lead to a quadratic equation in sin β. But we can solve this directly in MATLAB

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

View Full Document
9/1/11 function y = Eq(ang) y= 250*sind(70)*cosd(ang)-250*cosd(70)*sind(ang)- 160*sind(110); In MATLAB, define and save the function Eq (which represents the left side of the above equation Now, use the function fzero to find the angle at which this equation is zero. >> x = fzero(@(x) Eq(x), 0) x = 33.0295 Initial guess of the angle 25 0 7 0 11 0 16 0 B angle β (deg)
9/1/11 How does fzero work? It uses an iterative search to find where the equation is zero. We can see this zero by plotting the function: >> ang = linspace(0, 90, 200);

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &gt;&gt; y = Eq(ang) &gt;&gt; plot(ang, y) 1 3 4 5 7 8 9-2 5-2-1 5-1-5 5 1 y Note that in nonlinear problems like this there may be more than one zero and hence more than one solution. fzero will only find one zero at a time so we must be careful to make sure it is the solution we want. 9/1/11 We could actually solve this problem in one step by writing both the equations we used as : Now make up a MATLAB function with these two equations for the two unknowns, and B function y = Eqs(x) ang = x(1); B = x(2); y(1) = 250*sind(70)*cosd(ang)-250*cosd(70)*sind(ang)-160*sind(110); y(2) = 250*sind(ang) - B*sind(110); And use fsolve (which, unlike fzero, can solve multiple nonlinear equations) &gt;&gt; x = fsolve( @(x) Eqs(x) , [0;100]) x = 33.0295 145.0132 Initial guesses for angle and force...
View Full Document

## This note was uploaded on 09/01/2011 for the course E M 274 taught by Professor Donaldsturges during the Fall '07 term at Iowa State.

### Page1 / 4

Statics Notes Day 4 - &amp;amp;gt;&amp;amp;gt; y = Eq(ang)...

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

View Full Document
Ask a homework question - tutors are online