Effacer les filtres
Effacer les filtres

finding roots of the equation

1 vue (au cours des 30 derniers jours)
mohammad
mohammad le 10 Fév 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

Réponse acceptée

Matt Tearle
Matt Tearle le 10 Fév 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 commentaires
Walter Roberson
Walter Roberson le 10 Fév 2012
The real roots occur only for n <= 197 / 210
mohammad
mohammad le 10 Fév 2012
thanks let me check

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by