Question

Question 25 2 pts MATLABs fminbnd function can be used to find the minimum value of a function of two independent variables.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

25. FALSE , as fminbnd finds the minimum of a function of one variable within a fixed interval, anad will find a minimum that occurs on a boundary. to find more than one variable, we use fminsearch function.

26.ANSWER : (a) 0.55 (minimum value of w)

MATLAB CODE : ( by shooting method)

clear;
clc;

% Shooting Method
           f1 = @(z) z;
           f2 = @(w,z) w - 3*z;

h = 0.001;
a = 1;
b = 10;

% Initialize
        x = a:h:b;
        n = numel(x);
        w = zeros(1,numel(x));
        w(1) = 5;
        z = zeros(1,numel(x));
        z(1) = -15.33;

for i=1:n-1
         w(i+1) = w(i) + f1(z(i))*h;
         z(i+1) = z(i) + f2(w(i),z(i))*h;
end
fprintf('Minimum Value of w=%.2f\n',round(min(w),2))

figure(1)
hold on
plot(b,5,'ko','MarkerFaceColor','k','DisplayName','Actual Value at x = 10')
plot(x,w,'r-','DisplayName','Shooting Method','linewidth',2)
legend show
xlabel('x')
ylabel('w')
grid on
5. 6 Actual Value at x = 10 Shooting Method 4.5 4 3.5 3 3 2.5 N 1.5 1 0.5 1 2 3 4 5 6 7 8 9 10 х
Add a comment
Know the answer?
Add Answer to:
Question 25 2 pts MATLAB's fminbnd function can be used to find the minimum value of...
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
ADVERTISEMENT