Community Profile

photo

susan sara


Active since 2022

Spoken Languages:
English

Statistics

  • Thankful Level 3

View badges

Content Feed

View by

Question


Error "Supplied objective function must return a scalar value."
Hi,I am trying to minimize a function,but shows an error, clc; clear; gb=3;gs=8; G=[10;10;10;20;30;30;30]; Gh=[30;30;...

4 months ago | 1 answer | 0

1

answer

Question


How to plot 3D suraface and contour lines?
I want to plot the function X0=[0;0]; lb=[-10;10]; ub=[-10;10]; f=@(x)(2*x(1)+20/x(1)+2*x(2)+20/x(2)+120); x=fmincon(f,X0,[...

4 months ago | 1 answer | 0

1

answer

Question


How to correct the code?
In this code I optimize the objective function using fmincon.But I didnt get the correct output clc; clear all; gr=3;gs=8; ...

5 months ago | 1 answer | 0

1

answer

Question


How to optimize an objective function with repect to two variables using fmincon?
I want to maximize this objective function with respect to a and b using fmincon. max(-90a-90b+540) subjected to 3<=a ; b<=8

5 months ago | 1 answer | 0

1

answer

Question


How to correct the error in code?
clc; clear all; a1=3;b1=8; G=[0;1.5;2;3.5;4;4.5;4.5]; L=[3.0;2.5;3.5;3.5;3.2;4.2;4.0]; H=[40;40;40;20;20;20;20]; ...

5 months ago | 1 answer | 0

1

answer

Question


Error ' Index in position 2 exceeds array bounds'.how to correct this.
When run it, shows "Index in position 2 exceeds array bounds. Index must not exceed 2. Error in practice (line 20) while(a...

6 months ago | 1 answer | 0

1

answer

Question


How to correct my code?
In my problem there are 7 number of peoples and each one have different salary.Based on a condition they are divide as lenders,b...

6 months ago | 1 answer | 0

1

answer