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

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...

etwa 3 Stunden 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 ...

etwa 23 Stunden 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.

ein Tag 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...

ein Tag 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...

ein Tag 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...

ein Tag 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...

ein Tag 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...

3 Tage 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

5 Tage 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}...

7 Tage 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 ...

8 Tage 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)

8 Tage 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.

8 Tage 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')

8 Tage 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.

8 Tage 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(:))

8 Tage 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...

8 Tage 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 ...

8 Tage 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 Tage 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,...

10 Tage 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

10 Tage 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))

10 Tage ago | 0

Answered

fsolve function give poor results for multiple equations

Your equations are linear, so there is no reason to be using fsolve. I was able to obtain the coefficient matrix A for your line...

fsolve function give poor results for multiple equations

Your equations are linear, so there is no reason to be using fsolve. I was able to obtain the coefficient matrix A for your line...

10 Tage ago | 0

| accepted

Answered

Why do I only have an output of zeros for the 1 X 800

We cannot run your code, but a good debugging strategy would be to pause execution at this line, Kr_eff = ((1./mso).*sum(S.*(Ks...

Why do I only have an output of zeros for the 1 X 800

We cannot run your code, but a good debugging strategy would be to pause execution at this line, Kr_eff = ((1./mso).*sum(S.*(Ks...

10 Tage ago | 1

Answered

Nonlinear inequality in GA optimization with integer constraints

In the code you have shown for POWER_CONSTRAINT(~), it does not make sense that POWER does not depend on the input, but rather o...

Nonlinear inequality in GA optimization with integer constraints

In the code you have shown for POWER_CONSTRAINT(~), it does not make sense that POWER does not depend on the input, but rather o...

10 Tage ago | 0

Answered

I know how to divide my 256x256 image into 16x16 blocks using mat2cell. Now I want to access those 16x16 blocks successively to further divide them into 4x4 blocks.

Using mat2tiles https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equal-sized-sub-arrays ...

I know how to divide my 256x256 image into 16x16 blocks using mat2cell. Now I want to access those 16x16 blocks successively to further divide them into 4x4 blocks.

Using mat2tiles https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equal-sized-sub-arrays ...

10 Tage ago | 1

Answered

Generate a 100000x100000 matrix that takes less time and memory

Seems to me the whole code can be replaced by, function [a,ed] = Random_graph_genar_function(nodes, connectivity) a=logi...

Generate a 100000x100000 matrix that takes less time and memory

Seems to me the whole code can be replaced by, function [a,ed] = Random_graph_genar_function(nodes, connectivity) a=logi...

10 Tage ago | 0

| accepted

Answered

Randomized Groups of Array

Ex. I have 250 numbers and I want them in 50 groups of 5 reshape( randperm(250) , 5,50) or 25 groups of 10, reshape( randpe...

Randomized Groups of Array

Ex. I have 250 numbers and I want them in 50 groups of 5 reshape( randperm(250) , 5,50) or 25 groups of 10, reshape( randpe...

11 Tage ago | 0

Answered

How to solve explicit equation of ellipse

If you convert the ellipse to its polar representation https://en.wikipedia.org/wiki/Ellipse#Polar_form_relative_to_center tha...

How to solve explicit equation of ellipse

If you convert the ellipse to its polar representation https://en.wikipedia.org/wiki/Ellipse#Polar_form_relative_to_center tha...

11 Tage ago | 1

Answered

How to find the solutions to a set of linear equations?

You can easily trap the point where NaNs are introduced using >>dbstop if naninf https://www.mathworks.com/help/matlab/ref/dbs...

How to find the solutions to a set of linear equations?

You can easily trap the point where NaNs are introduced using >>dbstop if naninf https://www.mathworks.com/help/matlab/ref/dbs...

12 Tage ago | 0