How to solve max load of P in Matlab?

조회 수: 3 (최근 30일)
Katie
Katie 2013년 3월 20일
The equations governing the forces on the beam shown below are as follows:
F_ax=0
P=F_ay+F_by
P=(5.*F_by)./10
We want to determine the maximum load, P, which will result in a load at the roller, F_by, which does not exceed 500 lb.
Write a Matlab program which uses the above system of equations to determine the maximum force P which results in vertical force on the roller, F_by of between 499 lb and 500 lb. Your approach should repetitively solve the above system of equations until the desired result is obtained.
This is the code I have, but I don't know where to go next:
F_ax=0
F_by<=500 %lbs
F_by>=499 %lbs
P=F_ay+F_by
P=(5.*F_by)./10

답변 (1개)

bym
bym 2013년 3월 21일
So, when I see a problem statement that says "solve the above system of equations" I think of formulating the equations in matrix form. The coefficient matrix for the equations involving P is
c =
1.0000 1.0000
0 0.5000
when I see a problem statement that says "... until the desired result is obtained", I think of a loop structure
doc while
when the problem statement says "[repetitively] solve..." The repetition is taken care of in the loop, but solving usually involves finding the unknowns. this often involves mldivide
doc mldivide
As you can see, I haven't given you the direct answer, but areas to explore in solving your homework problem
  댓글 수: 2
Katie
Katie 2013년 3월 21일
How did you get c to answer in matrix form? And my professor hasn't gone over doc while of doc mldivide. We have just whose while and for loops and the expectations are to not use the short cuts. What is the difference of a doc while and a while loop?
bym
bym 2013년 3월 22일
doc command is just a way of getting to the help documentation from the command line. As far a getting the coefficient matrix, it is a matter of writing out the equations and putting the coefficients into a matrix, e.g.
1*F_ay+1*F_by = P
0*F_ay+.5*F_by = P
equals
[1,1;0,.5]*[F_ay;F_by] = [P;P]

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Direction of Arrival Estimation에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by