finding roots of the equation

2 visualizaciones (últimos 30 días)
mohammad
mohammad el 10 de Feb. de 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

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by