Question

1. A typical electrical engineering design problem might involve determining the proper resistor to dissipate energy at a spe
0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE

% Method of false position

% Given constants
L = 5;
C = 10^(-4);
t = 0.05;
qq0 = 100; % q0/q
f=@(R) qq0 * exp(-R*t/2/L) * cos( t * ( (1 / (L*C)) - (R /2/L )^2)^(0.5)) - 1 ;
err=1; %initial large error
tu = 400; %upper bound
tl = 0; %lower bound
fu = f(tu); %initial values
fl = f(tl);
i=0; % for counting iterations
while err > 10^(-5)
  
tr = tl -fl*(tu - tl)/(fu-fl); % false method formulation
  
fr = f(tr);
if sign(fr) == sign(fu) %checking the change of signs
tu=tr;
fu=fr;
else
tl= tr;
fl=fr;
end
err = abs(fr);
i=i+1;
end
fprintf('R of the equation by False-Position Method is found in %d iterations is %4.6f.\n',i,tr);

SCREENSHOTS

petrochemicalprocessing.m XI regressionandarea.m ×| Incremental-search, method.m X| NUMAL.m X| falseposition.m* ×1+ % MethodCommand Window >>falseposition R of the equation by False-Position Method is found in 19 iterations is 328.151494. fx. >>

Please go through above code and message me if you have any doubts.

Give me thumbs up. Thanks

Add a comment
Know the answer?
Add Answer to:
1. A typical electrical engineering design problem might involve determining the proper resistor to dissipate energy at a specified rate, with known values for L and C. For this problem, assume t...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT