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

Not enough input arguments when i call fmincon constraint function with multiple input parameters to pass into

The constraint and objective functions should have one input argument. If you have N unknowns, they should be passed in as an N-...

Not enough input arguments when i call fmincon constraint function with multiple input parameters to pass into

The constraint and objective functions should have one input argument. If you have N unknowns, they should be passed in as an N-...

alrededor de 11 horas ago | 1

| accepted

Answered

How can I find exactly the coordinates of the center of the yellow circle?

regionprops3( true(size(yourImage)) ,yourImage, 'WeightedCentroid')

How can I find exactly the coordinates of the center of the yellow circle?

regionprops3( true(size(yourImage)) ,yourImage, 'WeightedCentroid')

alrededor de 24 horas ago | 2

Answered

How to find the volume of a region in a segmented image?

stats = regionprops3(segmentationMap,'Volume')

How to find the volume of a region in a segmented image?

stats = regionprops3(segmentationMap,'Volume')

1 día ago | 0

Answered

Determine three model Parameters (least squares?)

lsqcurvefit would be appropriate, https://www.mathworks.com/help/optim/ug/lsqcurvefit.html

Determine three model Parameters (least squares?)

lsqcurvefit would be appropriate, https://www.mathworks.com/help/optim/ug/lsqcurvefit.html

1 día ago | 0

| accepted

Answered

Non linear fit of multiple data set

Because of the constraints, I think you'll just have to do it by Monte Carlo simulation...

Non linear fit of multiple data set

Because of the constraints, I think you'll just have to do it by Monte Carlo simulation...

1 día ago | 0

Answered

TD convolution versus FD multiplication

Remember, linear convolution is not the same as cyclic convolution. Make sure you do appropriate zero padding, e.g., x=rand(1,5...

TD convolution versus FD multiplication

Remember, linear convolution is not the same as cyclic convolution. Make sure you do appropriate zero padding, e.g., x=rand(1,5...

1 día ago | 0

Answered

How to take cross product of two 2D vector fields

result(:,:,3)=Ax.*By-Ay.*Bx;

How to take cross product of two 2D vector fields

result(:,:,3)=Ax.*By-Ay.*Bx;

1 día ago | 0

Answered

How to find shortest path length by adjacency matrix?

Use the adjacency matrix A to create a graph object, and then use the distances() command. https://www.mathworks.com/help/matla...

How to find shortest path length by adjacency matrix?

Use the adjacency matrix A to create a graph object, and then use the distances() command. https://www.mathworks.com/help/matla...

2 días ago | 0

| accepted

Answered

Create single columns of elementwise means

DF=mean(X_dark ,2); FF=mean(X_flat ,2); X_corrected=(X_proj-DF)./(FF-DF);

Create single columns of elementwise means

DF=mean(X_dark ,2); FF=mean(X_flat ,2); X_corrected=(X_proj-DF)./(FF-DF);

2 días ago | 0

| accepted

Answered

How to convert a matrix into some cells?

You can use mat2tiles, which you must Download. A=[1 0 ; 23 13; 1 9; 4 6; 7 13; 0 32]; Acell = m...

How to convert a matrix into some cells?

You can use mat2tiles, which you must Download. A=[1 0 ; 23 13; 1 9; 4 6; 7 13; 0 32]; Acell = m...

2 días ago | 0

| accepted

Answered

Put formula into quadprog

That would be, A=[]; b=[]; Aeq=[]; beq=[]; lb=zeros(1,numel(z)); and,

Put formula into quadprog

That would be, A=[]; b=[]; Aeq=[]; beq=[]; lb=zeros(1,numel(z)); and,

2 días ago | 0

| accepted

Answered

Solving system non-linear equations

You could do a numerical grid search using ndgrid to see where if anywhere, the approximate roots lie within a broad set of boun...

Solving system non-linear equations

You could do a numerical grid search using ndgrid to see where if anywhere, the approximate roots lie within a broad set of boun...

3 días ago | 0

| accepted

Answered

Generating adjacency matrix for following network

Perhaps as follows, n=6; T=nan(n,2); map=isnan(T); while any(map(:)) [i,~]=find(map,1); if ~map(i...

Generating adjacency matrix for following network

Perhaps as follows, n=6; T=nan(n,2); map=isnan(T); while any(map(:)) [i,~]=find(map,1); if ~map(i...

3 días ago | 0

Answered

Extending a 2D lattice of points

You can use scatteredInterpolant() or griddata().

Extending a 2D lattice of points

You can use scatteredInterpolant() or griddata().

4 días ago | 0

Answered

Fmincon - Variable dependent constraints

If you wish, you can download prob2matrices() and use the problem-based framework to help set up the linear constraints. x=opti...

Fmincon - Variable dependent constraints

If you wish, you can download prob2matrices() and use the problem-based framework to help set up the linear constraints. x=opti...

4 días ago | 1

Answered

Tridiagonal Matrix with subdiagonal and main diagonal is also matrix

Here's another way, probably much faster. N=1000; a1=4;b1=-1; A =diag(a1*ones(1,N-1)) + diag(b1*ones(1,N-2),1) + diag(b1...

Tridiagonal Matrix with subdiagonal and main diagonal is also matrix

Here's another way, probably much faster. N=1000; a1=4;b1=-1; A =diag(a1*ones(1,N-1)) + diag(b1*ones(1,N-2),1) + diag(b1...

4 días ago | 0

Answered

Tridiagonal Matrix with subdiagonal and main diagonal is also matrix

So, you want a block Toeplitz matrix? N = 5; A =diag([7 4 4]); B=[8 8 10; 2 5 2; 10 8 7]; C=zeros(3); blocks={C,B,A}; ...

Tridiagonal Matrix with subdiagonal and main diagonal is also matrix

So, you want a block Toeplitz matrix? N = 5; A =diag([7 4 4]); B=[8 8 10; 2 5 2; 10 8 7]; C=zeros(3); blocks={C,B,A}; ...

4 días ago | 0

| accepted

Answered

Non-square FFT

There's probably no significant efficiency to be gained if you just want to get rid of half of the frequencies, as in the examp...

Non-square FFT

There's probably no significant efficiency to be gained if you just want to get rid of half of the frequencies, as in the examp...

5 días ago | 0

Answered

Optimize Function with two sums using fmincon

k = [5,7,11,13]; p = [1:4]; a0 = [pi/10, pi/8, pi/7, pi/5]; weights=(1./k.^4); weights=weights/sum(weights); fun = @(a)...

Optimize Function with two sums using fmincon

k = [5,7,11,13]; p = [1:4]; a0 = [pi/10, pi/8, pi/7, pi/5]; weights=(1./k.^4); weights=weights/sum(weights); fun = @(a)...

5 días ago | 0

| accepted

Answered

Add missing numbers between elements in an array

Var1= [1 1 2 4 5 7 7 7 8 10 11 13 14 14 17 17 17 17 18 20]; Var2= [0.5 0.3 0.1 0.6 0.2 0.4 0.8 0.9 0.3 0.2 0.1 0.4 0.8 0.7 0.5 ...

Add missing numbers between elements in an array

Var1= [1 1 2 4 5 7 7 7 8 10 11 13 14 14 17 17 17 17 18 20]; Var2= [0.5 0.3 0.1 0.6 0.2 0.4 0.8 0.9 0.3 0.2 0.1 0.4 0.8 0.7 0.5 ...

5 días ago | 0

Answered

User defined function that evaluates anonymous function with variable number of inputs

The code would be a lot more efficient and tidy if you had the anonymous function accept an MxN array X. fun=@(X) X*[2,-1,-3,+9...

User defined function that evaluates anonymous function with variable number of inputs

The code would be a lot more efficient and tidy if you had the anonymous function accept an MxN array X. fun=@(X) X*[2,-1,-3,+9...

6 días ago | 0

Answered

Problem is unbounded with linprog

Another way to verify that there is no solution is to look at the dual linear program. min. 8*u+4*v s.t. 2*u +2*v >= ...

Problem is unbounded with linprog

Another way to verify that there is no solution is to look at the dual linear program. min. 8*u+4*v s.t. 2*u +2*v >= ...

6 días ago | 0

Answered

How to color grids underneath a curve and also gradient the grids depending on how much is within curve?

One way, xCenter = 10; yCenter = 10; radius = 10; theta = linspace(180, 270, 50); x = radius * cosd(theta) + xCenter; y = ...

How to color grids underneath a curve and also gradient the grids depending on how much is within curve?

One way, xCenter = 10; yCenter = 10; radius = 10; theta = linspace(180, 270, 50); x = radius * cosd(theta) + xCenter; y = ...

6 días ago | 0

Answered

Can I speed up this matrix multiplication?

For example, the size of Q is 1000x1000, but its rank is 10. If so, then we can decompose Q into a short sum where and are t...

Can I speed up this matrix multiplication?

For example, the size of Q is 1000x1000, but its rank is 10. If so, then we can decompose Q into a short sum where and are t...

6 días ago | 1

| accepted

Question

Malwarebytes thinks these Matlab files are malware

Malwarebytes flagged the 4 files below from my R2020b installation. Has anyone else experienced this? Can I safely assume it's a...

6 días ago | 1 answer | 1

Answered

sum of kronecker products(four loops)

For me, the following test for N=20 gives a very low percent error, so I would bet that the two are equivalent. N=20; [var1,va...

sum of kronecker products(four loops)

For me, the following test for N=20 gives a very low percent error, so I would bet that the two are equivalent. N=20; [var1,va...

7 días ago | 0

Answered

Version MATLAB 2020b: How can i convert an array to cell array with specific size?

output=mat2cell(MP1,1,Set)

Version MATLAB 2020b: How can i convert an array to cell array with specific size?

output=mat2cell(MP1,1,Set)

7 días ago | 0

| accepted

Answered

How can the data point, where values start to increase for the first time in a data, be found, as this increase continues at the following 30 values?

This uses the File Exchange contributions groupTrue and groupFcn (Download): G=groupTrue( diff(data)>0 ); g=find( groupFcn(...

How can the data point, where values start to increase for the first time in a data, be found, as this increase continues at the following 30 values?

This uses the File Exchange contributions groupTrue and groupFcn (Download): G=groupTrue( diff(data)>0 ); g=find( groupFcn(...

7 días ago | 0

| accepted