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

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

3 hours 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 hours ago | 0

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

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

20 hours 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 >= ...

1 day 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 = ...

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

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

1 day ago | 0 answers | 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...

2 days 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)

2 days 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(...

2 days ago | 0

| accepted

Answered

Calculate perimeter of a shape using x,y coordinates input to an array

pgon=polyshape(dataX,dataY); perimeter(pgon)

Calculate perimeter of a shape using x,y coordinates input to an array

pgon=polyshape(dataX,dataY); perimeter(pgon)

2 days ago | 0

Answered

Subtracting specific places in vector using diff

1- Not with |diff(). If you wanted to do that, it would be x(2:2:end)-x(1:2:end) 2. diff(X,n) approsimates the n-th derivative...

Subtracting specific places in vector using diff

1- Not with |diff(). If you wanted to do that, it would be x(2:2:end)-x(1:2:end) 2. diff(X,n) approsimates the n-th derivative...

3 days ago | 0

| accepted

Answered

linearly independent or linearly dependent.

If [S,v] and S have the same rank, then the column vector v must be a linear combination of the columns of the matrix S.Testing...

linearly independent or linearly dependent.

If [S,v] and S have the same rank, then the column vector v must be a linear combination of the columns of the matrix S.Testing...

3 days ago | 1

Answered

Optimisation error_constraint

Whenever Matlab complains that a variable is the wrong type, you should look at the variable you've made and check what type it ...

Optimisation error_constraint

Whenever Matlab complains that a variable is the wrong type, you should look at the variable you've made and check what type it ...

3 days ago | 0

| accepted

Answered

expanding matrix with linear line between new samples

B=[1 0 0 0 2 0 0 3]; x=find(B~=0); xq=1:numel(B); B=interp1(x,B(x),xq)

expanding matrix with linear line between new samples

B=[1 0 0 0 2 0 0 3]; x=find(B~=0); xq=1:numel(B); B=interp1(x,B(x),xq)

3 days ago | 0

| accepted

Answered

How to fill 3D array using for loop with data z allocated to specific x and y values

X=[0.5;0.5;0.6;0.6]; Y=[0.6;0.7;0.6;0.7]; V=[1.0794;1.1794;1.1646;1.2646]; [I,J,K]=ndgrid(1:le...

How to fill 3D array using for loop with data z allocated to specific x and y values

X=[0.5;0.5;0.6;0.6]; Y=[0.6;0.7;0.6;0.7]; V=[1.0794;1.1794;1.1646;1.2646]; [I,J,K]=ndgrid(1:le...

3 days ago | 0

| accepted

Answered

Too many output arguments while solving a constrained optimization problem.

You are reporting multiple different errors in multiple different places from multiple different Matlab versions, so it is a lit...

Too many output arguments while solving a constrained optimization problem.

You are reporting multiple different errors in multiple different places from multiple different Matlab versions, so it is a lit...

3 days ago | 0

| accepted

Answered

Counting distinct elements in a vector?

numel(unique(A)) or max(findgroups(A))

Counting distinct elements in a vector?

numel(unique(A)) or max(findgroups(A))

3 days ago | 0

| accepted

Answered

Too many output arguments while solving a constrained optimization problem.

I get no problem in R2020b once the last line is modified to, prob.solve(x0)

Too many output arguments while solving a constrained optimization problem.

I get no problem in R2020b once the last line is modified to, prob.solve(x0)

3 days ago | 0

Answered

How can I give a rotational velocity to spheres?

This uses AxelRot from the File Exchange (Download): figh = figure; %%Axes ax = axes('XLim',[-4 4],'YLim',[-4 4],'ZLim',[-4...

How can I give a rotational velocity to spheres?

This uses AxelRot from the File Exchange (Download): figh = figure; %%Axes ax = axes('XLim',[-4 4],'YLim',[-4 4],'ZLim',[-4...

4 days ago | 0

| accepted

Answered

Can I speed up this matrix multiplication?

I have tried gpuArray, but it cannot be faster than normal Matlab * operation (maybe my GPU is not good enough..) Depending on...

Can I speed up this matrix multiplication?

I have tried gpuArray, but it cannot be faster than normal Matlab * operation (maybe my GPU is not good enough..) Depending on...

4 days ago | 1

Answered

Can you organize scatter plot points?

This may be more along the lines of what you were originally looking for load Data; w=max( max(data,[],1) - min(data,[],...

Can you organize scatter plot points?

This may be more along the lines of what you were originally looking for load Data; w=max( max(data,[],1) - min(data,[],...

4 days ago | 0

Answered

Is there a way to vectorise this vector/matrix product?

G=real( sum((R*W).*conj(W),1) );

Is there a way to vectorise this vector/matrix product?

G=real( sum((R*W).*conj(W),1) );

5 days ago | 2

| accepted

Answered

Plot a best fit ellipse on a polar data set

Yes, it's possible, although the the quality of the fit will be affected by how clustered and how noisy your data is. For the fi...

Plot a best fit ellipse on a polar data set

Yes, it's possible, although the the quality of the fit will be affected by how clustered and how noisy your data is. For the fi...

5 days ago | 0

| accepted

Answered

How to Compute Cartesian to Polar If the ThetaZeroLocation on Top ?

x = -0.00781250; y = -9.593750000000000; t = 90-atan2d(y,x) %for theta

How to Compute Cartesian to Polar If the ThetaZeroLocation on Top ?

x = -0.00781250; y = -9.593750000000000; t = 90-atan2d(y,x) %for theta

5 days ago | 0

| accepted

Answered

Can you organize scatter plot points?

I think it may make more sense for you to move to a proper violin plot. With this 3rd party file, for example https://github.co...

Can you organize scatter plot points?

I think it may make more sense for you to move to a proper violin plot. With this 3rd party file, for example https://github.co...

5 days ago | 0

| accepted

Answered

Is there a way to extract the 4 corners points from all the points found with detectMinEigenFeatures?

If you have a binary map of the chequerboard, you can use imerode to separate the black squares and then pgonCorners https://ww...

Is there a way to extract the 4 corners points from all the points found with detectMinEigenFeatures?

If you have a binary map of the chequerboard, you can use imerode to separate the black squares and then pgonCorners https://ww...

5 days ago | 1

| accepted