finding roots of the equation

3 ビュー (過去 30 日間)
mohammad
mohammad 2012 年 2 月 10 日
For several value of n (n=1,2,3,4,...), it was needed to find roots of under equation.
f(n,I)=n*210+(I^2/n)*[(((200-32I)^2)/200)+32]-197
Please help me, how can I find answer by using MATLAB. And please give me answers (value of I) for n=1,2,3,4,5

採用された回答

Matt Tearle
Matt Tearle 2012 年 2 月 10 日
You may want to check your function, because it doesn't seem to have any (real) zeros:
f = @(n,I) n*210+(I.^2/n).*((((200-32*I).^2)/200)+32)-197;
figure
I = linspace(-100,100,5001);
y = f(1,I);
plot(I,y)
min(y)
But, the approach would be to define a function handle for f, as above, then set the value of n and apply fzero to the resulting function of one variable ( I ):
f = @(n,I) n*210+(I.^2/n).*((((200-32*I).^2)/200)+32)-197;
I0 = 0; % Make an initial guess
for n = 1:5
g = @(I) f(n,I); % Make a new function from f(n,I) with n fixed
I0 = fzero(g,I0) % Find zero, starting with previous result
end
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 2 月 10 日
The real roots occur only for n <= 197 / 210
mohammad
mohammad 2012 年 2 月 10 日
thanks let me check

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by