フィルターのクリア

Problem using the Secant Method

3 ビュー (過去 30 日間)
Yianni
Yianni 2014 年 11 月 7 日
コメント済み: Star Strider 2014 年 11 月 7 日
I want to solve a problem in which I am given a function (seen below) where W is 250 and I must find x. I have to use the secant method but I am having trouble with this as I only know how to find the roots. How can I do this?
% Function that determines the weight or downward force(W) of an object
% with a chosen vertical deflection value "x" in m.
function W = weight(x)
a = 0.15; %Constant value "a"
b = 0.05; %Constant value "b"
K = 2800; %Force of springs in N/m
L = sqrt(a^2+(b+x)^2); %Hypotenuse Length of Right Triangle
Lo = sqrt(a^2+b^2); %Unstretched Length
dL = L-Lo; %Difference of Stretched vs Unstretched Length
SINtheta = (b+x)/L; %Length of side opposite angle theta/Hypotenuse
W = 2*K*dL*SINtheta; %Downward force due to weight in N
end

採用された回答

Star Strider
Star Strider 2014 年 11 月 7 日
I would add 250 to ‘W’ and solve for the root.
  2 件のコメント
Yianni
Yianni 2014 年 11 月 7 日
On the second to last line?
Star Strider
Star Strider 2014 年 11 月 7 日
Yes. That’s how I would do it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssembly についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by