finding roots of the equation

4 Ansichten (letzte 30 Tage)
mohammad
mohammad am 10 Feb. 2012
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

Akzeptierte Antwort

Matt Tearle
Matt Tearle am 10 Feb. 2012
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 Kommentare
Walter Roberson
Walter Roberson am 10 Feb. 2012
The real roots occur only for n <= 197 / 210
mohammad
mohammad am 10 Feb. 2012
thanks let me check

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by