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

Termination Conditions fmincon: Optimality

In the constrained case, the first order optimality metric, described here, https://www.mathworks.com/help/optim/ug/first-order...

Termination Conditions fmincon: Optimality

In the constrained case, the first order optimality metric, described here, https://www.mathworks.com/help/optim/ug/first-order...

13 hours ago | 0

| accepted

Answered

Solving "transposed" Lyapunov equation AX+X'B=Q

I don't know how large your system is, but if not super-large you could use func2mat, https://www.mathworks.com/matlabcentral/f...

Solving "transposed" Lyapunov equation AX+X'B=Q

I don't know how large your system is, but if not super-large you could use func2mat, https://www.mathworks.com/matlabcentral/f...

13 hours ago | 0

Answered

Error using vertcat Dimensions of arrays being concatenated are not consistent.

Well, for example dXadt is 1x2 and dXedt is 1x1, so you cannot stack them on top of each other to form a new matrix. dXadt ...

Error using vertcat Dimensions of arrays being concatenated are not consistent.

Well, for example dXadt is 1x2 and dXedt is 1x1, so you cannot stack them on top of each other to form a new matrix. dXadt ...

18 hours ago | 0

Answered

Rowfun and sum of array elements based on start and stop position from another array

It works with loops but the size of my table makes it quite slow It shouldn't be. Even with several thousand table columns, a l...

Rowfun and sum of array elements based on start and stop position from another array

It works with loops but the size of my table makes it quite slow It shouldn't be. Even with several thousand table columns, a l...

21 hours ago | 0

| accepted

Answered

Rowfun and sum of array elements based on start and stop position from another array

So, how to achieve that simple operation with rowfun? I don't see rowfun as being part of the solution. Just pull the values ou...

Rowfun and sum of array elements based on start and stop position from another array

So, how to achieve that simple operation with rowfun? I don't see rowfun as being part of the solution. Just pull the values ou...

21 hours ago | 0

Answered

How can I rescale an image three dimensions (128*128*3) into 2D as (128*128) double ? please

rgb2gray(img)

How can I rescale an image three dimensions (128*128*3) into 2D as (128*128) double ? please

rgb2gray(img)

22 hours ago | 1

Answered

Compatible Problem in Matlab: LineSearchType option is no longer valid in using optimset

options = optimset('LargeScale', 'off', 'HessUpdate', 'dfp','MaxFunEvals', MaxFunEvals, ... 'display', 'of...

Compatible Problem in Matlab: LineSearchType option is no longer valid in using optimset

options = optimset('LargeScale', 'off', 'HessUpdate', 'dfp','MaxFunEvals', MaxFunEvals, ... 'display', 'of...

22 hours ago | 0

Answered

Rotation of an xy coordinate system

Looks fine to me. When you rotate about the origin, the only point that stays fixed is the origin.

Rotation of an xy coordinate system

Looks fine to me. When you rotate about the origin, the only point that stays fixed is the origin.

22 hours ago | 0

| accepted

Answered

How can I convert 100 X Y and Z coordinates generated randomly in the form of a 100x100x100 matrix

If you mean you want a 100x100x100 binary array A with one hundred randomly located entries where A(i,jk)=1, then A=false(100...

How can I convert 100 X Y and Z coordinates generated randomly in the form of a 100x100x100 matrix

If you mean you want a 100x100x100 binary array A with one hundred randomly located entries where A(i,jk)=1, then A=false(100...

1 day ago | 0

| accepted

Answered

fmincon MATLAB function using gradient

Because of the discontinuity at x1=0 and x2=0, you need to optimize over each quadrant separately. s=[+1,+1; %quadrant signs ...

fmincon MATLAB function using gradient

Because of the discontinuity at x1=0 and x2=0, you need to optimize over each quadrant separately. s=[+1,+1; %quadrant signs ...

2 days ago | 0

Answered

Mean Variance portfolio selection with l1-norm

Sure. Minimizing a quadratic subject to linear constraints is exactly what quadprog is for.

Mean Variance portfolio selection with l1-norm

Sure. Minimizing a quadratic subject to linear constraints is exactly what quadprog is for.

2 days ago | 0

Answered

How to perform image registration on GPU

If you only need to register translation, you can use normxcorr2() which is GPU-supported https://www.mathworks.com/help/images...

How to perform image registration on GPU

If you only need to register translation, you can use normxcorr2() which is GPU-supported https://www.mathworks.com/help/images...

2 days ago | 0

Answered

how to find coordinates of each brick corners using matlab

After applying imopen() like ImageAnalyst recommends, you could download pgonCorners and apply it as in this example in this exa...

how to find coordinates of each brick corners using matlab

After applying imopen() like ImageAnalyst recommends, you could download pgonCorners and apply it as in this example in this exa...

2 days ago | 0

Answered

What is wrong with my for loop?

It seems clear that when i=j, the left hand side of K((j*s-j-1):(i*s-i-1), (j*s-j-1):(i*s-i-1)) = k(1:s,1:s); will be 1x1 wher...

What is wrong with my for loop?

It seems clear that when i=j, the left hand side of K((j*s-j-1):(i*s-i-1), (j*s-j-1):(i*s-i-1)) = k(1:s,1:s); will be 1x1 wher...

3 days ago | 1

Answered

Drawing 4-sided polygons around objects

This will help to find the corners of the boxes. https://www.mathworks.com/matlabcentral/fileexchange/74181-find-vertices-in-im...

Drawing 4-sided polygons around objects

This will help to find the corners of the boxes. https://www.mathworks.com/matlabcentral/fileexchange/74181-find-vertices-in-im...

3 days ago | 0

Answered

Stop chatting, MATLAB!

Just a guess, but you might try going into Preferences>>General and unchecking the option to send telemetry info back to MathWor...

Stop chatting, MATLAB!

Just a guess, but you might try going into Preferences>>General and unchecking the option to send telemetry info back to MathWor...

4 days ago | 0

Answered

How can we refer world coordinate to image coordinates??

You have world2Intrinsic() https://www.mathworks.com/help/images/ref/imref2d.worldtointrinsic.html

How can we refer world coordinate to image coordinates??

You have world2Intrinsic() https://www.mathworks.com/help/images/ref/imref2d.worldtointrinsic.html

6 days ago | 0

| accepted

Answered

Cone constraints with mixed integer programming

My approach would be to reduce this to a 1-variable minimization over x(11) and solve that with fminsearch, [Combinations{1:10}...

Cone constraints with mixed integer programming

My approach would be to reduce this to a 1-variable minimization over x(11) and solve that with fminsearch, [Combinations{1:10}...

8 days ago | 1

Answered

Find nonzero elements in 5x5 matrix (diagonal, vertical, horizontal line)

For example, to search for a column string, A =[ 1 4 4 4 5 3 1 4 1 4 5 ...

Find nonzero elements in 5x5 matrix (diagonal, vertical, horizontal line)

For example, to search for a column string, A =[ 1 4 4 4 5 3 1 4 1 4 5 ...

9 days ago | 0

| accepted

Answered

How can I fit multiple lines through a common y-intercept?

p=[x(:).^[1,0] ,0*x(:); 0*x(:),x(:).^[0,1]] \[y1(:);y2(:)]; m1=p(1) b=p(2) m2=p(3)

How can I fit multiple lines through a common y-intercept?

p=[x(:).^[1,0] ,0*x(:); 0*x(:),x(:).^[0,1]] \[y1(:);y2(:)]; m1=p(1) b=p(2) m2=p(3)

9 days ago | 2

| accepted

Answered

fmincon very slow for a small scale problem

Don't use Symbolic Toolbox operations. Remove all the sym operations and just convert fnsum to a numerical objective function.

fmincon very slow for a small scale problem

Don't use Symbolic Toolbox operations. Remove all the sym operations and just convert fnsum to a numerical objective function.

9 days ago | 0

| accepted

Answered

Double summation of a matrix

The expression in your .jpg file, if it needs to be evaulated for all p,q would be SML=conv2(ML,ones(N+1),'same')

Double summation of a matrix

The expression in your .jpg file, if it needs to be evaulated for all p,q would be SML=conv2(ML,ones(N+1),'same')

9 days ago | 0

Answered

Prevent a figure/axis from being made current manually

Like Walter mentioned, setting the figures HandleVisibility to off seems to do the job.

Prevent a figure/axis from being made current manually

Like Walter mentioned, setting the figures HandleVisibility to off seems to do the job.

9 days ago | 1

| accepted

Answered

Double summation of a matrix

In recent Matlab, you can do sum(matrix,'all') or more generally you can do sum(matrix(:))

Double summation of a matrix

In recent Matlab, you can do sum(matrix,'all') or more generally you can do sum(matrix(:))

9 days ago | 0

Answered

Why Matlab tells the following A*A^T matrix is not a positive Semi-definite Matrix ?

Yes, it is positive semi-definite. But Matlab's ability to detect that is limited, because finite precision prevents it from com...

Why Matlab tells the following A*A^T matrix is not a positive Semi-definite Matrix ?

Yes, it is positive semi-definite. But Matlab's ability to detect that is limited, because finite precision prevents it from com...

9 days ago | 0

| accepted

Question

Prevent a figure/axis from being made current manually

Is there a way to disable the ability of the figure window to automatically become the current figure when a manual user action ...

9 days ago | 2 answers | 0

Answered

Why matlab live editor and matlab script gives different rank calculation result for the same matrix ?

Probably because you copy-pasted the values of M from the screen to one of the scripts.

Why matlab live editor and matlab script gives different rank calculation result for the same matrix ?

Probably because you copy-pasted the values of M from the screen to one of the scripts.

10 days ago | 0

| accepted

Answered

How to rotate 3D cube so that one face is normal to a given axis

If I can choose the missing rotation angle freely, then here is one solution. % Centre of system coords_source_xyz= [-0.5,...

How to rotate 3D cube so that one face is normal to a given axis

If I can choose the missing rotation angle freely, then here is one solution. % Centre of system coords_source_xyz= [-0.5,...

11 days ago | 0

| accepted

Answered

Fitting Data from a matrix to polynomial

A very relevant example: https://www.mathworks.com/help/curvefit/fit.html#bto_zh5-3

Fitting Data from a matrix to polynomial

A very relevant example: https://www.mathworks.com/help/curvefit/fit.html#bto_zh5-3

11 days ago | 0

Answered

How to solve a nonlinear equation?

[x,fval] = fzero( @(x) x^(8.5)+3*x.^2-3000,nthroot(3000,8.5))

How to solve a nonlinear equation?

[x,fval] = fzero( @(x) x^(8.5)+3*x.^2-3000,nthroot(3000,8.5))

11 days ago | 0