Professional Interests: medical image processing, optimization algorithms

PLEASE NOTE: I do not read email sent through my author page. Please post questions about FEX submissions in their respective Comments section.

Answered

Fmincon gives relative maximum constraint violation but still gives output due to conflicting constraints.

For example, [tmp,fval,exitflag] = fmincon(Total_Profit,Guess,A,b,Aeq,beq,LB,UB,[],options); if exitflag>0 xopt(i,:...

Fmincon gives relative maximum constraint violation but still gives output due to conflicting constraints.

For example, [tmp,fval,exitflag] = fmincon(Total_Profit,Guess,A,b,Aeq,beq,LB,UB,[],options); if exitflag>0 xopt(i,:...

ongeveer 2 uur ago | 0

Answered

Calculate the midpoint of two lines on a track

The effectiveness of any solution we give will depend on whether the illumination levels of every frame will be similar to your ...

Calculate the midpoint of two lines on a track

The effectiveness of any solution we give will depend on whether the illumination levels of every frame will be similar to your ...

1 dag ago | 0

Answered

Preallocation within an optimization loop

xopt=nan(runs,2); %Pre-allocate Total_Private_Profit=nan(runs,2); %Pre-allocate for i = ...

Preallocation within an optimization loop

xopt=nan(runs,2); %Pre-allocate Total_Private_Profit=nan(runs,2); %Pre-allocate for i = ...

1 dag ago | 0

| accepted

Answered

orthagonal planes and normal vectors

format long; A=normalize( [3,2,-1; 3,-8,-7;-22,18,-30] ,2,'norm'); If they are orthogonal, this should give the identity matr...

orthagonal planes and normal vectors

format long; A=normalize( [3,2,-1; 3,-8,-7;-22,18,-30] ,2,'norm'); If they are orthogonal, this should give the identity matr...

2 dagen ago | 1

Answered

Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.699518e-25.

If C is singular, then C is singular and that's all there is to it. However, this will make the same inversion slightly less sin...

Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.699518e-25.

If C is singular, then C is singular and that's all there is to it. However, this will make the same inversion slightly less sin...

2 dagen ago | 0

| accepted

Answered

How to plot the trajectory that fminsearch follows?

trajectory=doIt(); fcontour(@rosenbrock, [0 3 -3 3],'LineColor', '#00FFFF', 'MeshDensity',50,... ...

How to plot the trajectory that fminsearch follows?

trajectory=doIt(); fcontour(@rosenbrock, [0 3 -3 3],'LineColor', '#00FFFF', 'MeshDensity',50,... ...

2 dagen ago | 1

| accepted

Answered

Sparse vs Least square solution differ at the edges

Because you forgot to transpose c, s2 = mldivide(full(c.'),b.').';

Sparse vs Least square solution differ at the edges

Because you forgot to transpose c, s2 = mldivide(full(c.'),b.').';

3 dagen ago | 0

| accepted

Answered

Drawing upon general, user-created mfiles and .mat files for the Answers forum RUN feature

Here is a test of the technique using an attached mfunction. websave('testfunction', 'https://www.mathworks.com/matlabcentral/a...

Drawing upon general, user-created mfiles and .mat files for the Answers forum RUN feature

Here is a test of the technique using an attached mfunction. websave('testfunction', 'https://www.mathworks.com/matlabcentral/a...

3 dagen ago | 0

Question

Drawing upon general, user-created mfiles and .mat files for the Answers forum RUN feature

Thanks to brilliant advice from Ameer Hamza, I have found a way to draw upon URL-posted .mat files as input to the Matlab Answer...

3 dagen ago | 1 answer | 0

Answered

Help me how to find the base of the intersection of two subspaces

If the vectors form the columns of a matrix A and the vectors form the columns of a matrix B, then the basis of the intersecti...

Help me how to find the base of the intersection of two subspaces

If the vectors form the columns of a matrix A and the vectors form the columns of a matrix B, then the basis of the intersecti...

3 dagen ago | 1

| accepted

Answered

Using blockproc to simply copy an array

Using sepblockfun from the file exchange, https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-opera...

Using blockproc to simply copy an array

Using sepblockfun from the file exchange, https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-opera...

4 dagen ago | 0

Answered

Random number generator with max and min values included in the matrix

I believe your code already works as written. Problem solved?

Random number generator with max and min values included in the matrix

I believe your code already works as written. Problem solved?

4 dagen ago | 0

Answered

Optimize model parameters given minimum sum of error square

It does not make sense that there are randomization operations like normrnd in your objective function. How can a function be "m...

Optimize model parameters given minimum sum of error square

It does not make sense that there are randomization operations like normrnd in your objective function. How can a function be "m...

4 dagen ago | 0

Question

Save and load alternative sets of preferences

I know how to set Preferences in Matlab through GUI buttons, however, suppose I have different sets of preferences that I wou...

5 dagen ago | 1 answer | 0

Answered

fsolve with one variabel

I don't understand why you would be using Symbolic Math Toolbox variables, syms x unless you were planning to use solve, Tinc...

fsolve with one variabel

I don't understand why you would be using Symbolic Math Toolbox variables, syms x unless you were planning to use solve, Tinc...

6 dagen ago | 1

| accepted

Answered

curve fitting with dependencies between the coefficients

Re-express your model function as, sin(d1)^2*(1-exp(-a1*(t^n1))) + cos(d1)^2*sin(d2)^2*(1-exp(-a2*(t^n2))) +... ...

curve fitting with dependencies between the coefficients

Re-express your model function as, sin(d1)^2*(1-exp(-a1*(t^n1))) + cos(d1)^2*sin(d2)^2*(1-exp(-a2*(t^n2))) +... ...

7 dagen ago | 0

Answered

What happens if I use parfor and the fmincon/fminunc option "UseParallel" together?

I don't know the answer to that directly, but it is easy to show by example that turning off 'UseParallel' can be beneficial: o...

What happens if I use parfor and the fmincon/fminunc option "UseParallel" together?

I don't know the answer to that directly, but it is easy to show by example that turning off 'UseParallel' can be beneficial: o...

7 dagen ago | 0

Answered

fmincon Constraint Query Optimization

Generally, all constraints must operate on the total set of unknows x1,..x10. However, given A1,A2, b1,b2 it is simple enough to...

fmincon Constraint Query Optimization

Generally, all constraints must operate on the total set of unknows x1,..x10. However, given A1,A2, b1,b2 it is simple enough to...

7 dagen ago | 0

| accepted

Answered

show det(A) = det(A') ?

But it's not true! A=rand(200); isequal(det(A),det(A.'))

show det(A) = det(A') ?

But it's not true! A=rand(200); isequal(det(A),det(A.'))

7 dagen ago | 0

Answered

Optimization problem on Constraint declaration

We can't tell from your code what the relation is supposed to be between a, wd and x. This might be what you were trying to do, ...

Optimization problem on Constraint declaration

We can't tell from your code what the relation is supposed to be between a, wd and x. This might be what you were trying to do, ...

7 dagen ago | 0

| accepted

Answered

How to use for loop to set properties' attributes in MATLAB class?

You cannot put a for loop or other complex code inside a properties block. If you wish, you can set a default value for a proper...

How to use for loop to set properties' attributes in MATLAB class?

You cannot put a for loop or other complex code inside a properties block. If you wish, you can set a default value for a proper...

7 dagen ago | 1

| accepted

Answered

Using the given code, how can I optimize a matrix to minimize a cost function?

Well, the way you would approach it is using fmincon as below. Using your initial guess of zeros(N,M), fmincon is unable to find...

Using the given code, how can I optimize a matrix to minimize a cost function?

Well, the way you would approach it is using fmincon as below. Using your initial guess of zeros(N,M), fmincon is unable to find...

7 dagen ago | 0

| accepted

Answered

How to input dependent parameters in matlab function?

These two, out = myfun(A,B,optionC,dependent_C1) out = myfun(A,B,optionC,dependent_C2) are not possible simultaneously. If ...

How to input dependent parameters in matlab function?

These two, out = myfun(A,B,optionC,dependent_C1) out = myfun(A,B,optionC,dependent_C2) are not possible simultaneously. If ...

8 dagen ago | 0

| accepted

Answered

fmincon - Converged to an infeasible point.

The max() operations in your constraints disqualify fmincon as a valid tool for this problem - the constraint functions are assu...

fmincon - Converged to an infeasible point.

The max() operations in your constraints disqualify fmincon as a valid tool for this problem - the constraint functions are assu...

9 dagen ago | 0

Answered

checking input an integer greater than 0?

validateattributes(yourInput,"numeric",{"integer","nonnegative"})

checking input an integer greater than 0?

validateattributes(yourInput,"numeric",{"integer","nonnegative"})

9 dagen ago | 0

Answered

Why do the ylabel renderings look different when Property Inspector says they are the same?

I figured it out. The syntax for the second plot needed to be, ylabel('Local Deviation (\%)','Interpreter','latex') ; %percent ...

Why do the ylabel renderings look different when Property Inspector says they are the same?

I figured it out. The syntax for the second plot needed to be, ylabel('Local Deviation (\%)','Interpreter','latex') ; %percent ...

9 dagen ago | 0

| accepted

Answered

How to solve Ax=b where A is a rectangular matrix for higher order in matlab

x=A\b

How to solve Ax=b where A is a rectangular matrix for higher order in matlab

x=A\b

9 dagen ago | 2

| accepted

Question

Why do the ylabel renderings look different when Property Inspector says they are the same?

The image below is a screenshot of two different y-axis labels that I have in two different figure windows, generated in R2020a....

9 dagen ago | 2 answers | 0

Question

How to load a .mat file from a URL

I find that I cannot load a .mat file from a URL. For example, when I try to call load() with the full URL of the attached .mat ...

10 dagen ago | 1 answer | 1