Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A) I am trying to find the minimum value of the function f and i dont know what I am doing wrong. The following is
A) I am trying to find the minimum value of the function f and i dont know what I am doing wrong. The following is what i input into Matlab:
B) How would I also have the area under the curve in Matlab [-10 10] ?
>> f f = function handle with value: @(x)4*.^2-50*X+5 >> options = optimset('display','off', 'Algorithm', 'active-set'); >> [xmin] = fmincon (f, [6 -130],[],[],[],[], [-10 -10], [10 10], [], options) Error using fmincon (line 619) Supplied objective function must return a scalar value. >> f f = function handle with value: @(x)4*.^2-50*X+5 >> options = optimset('display','off', 'Algorithm', 'active-set'); >> [xmin] = fmincon (f, [6 -130],[],[],[],[], [-10 -10], [10 10], [], options) Error using fmincon (line 619) Supplied objective function must return a scalar valueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started