5,669 total contributions since 2009

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

Quadprog 'interior-point-convex' failure

Simply l2-normalizing the rows of A also seems to help, load('testData-Matt.mat'); opts = optimoptions(@quadprog,'Algorithm'...

Quadprog 'interior-point-convex' failure

Simply l2-normalizing the rows of A also seems to help, load('testData-Matt.mat'); opts = optimoptions(@quadprog,'Algorithm'...

3 hours ago | 1

| accepted

Answered

Quadprog 'interior-point-convex' failure

I don't have a pre-R2016a Matlab release readily at hand, and so I cannot compare performance. However, if the problem is simply...

Quadprog 'interior-point-convex' failure

I don't have a pre-R2016a Matlab release readily at hand, and so I cannot compare performance. However, if the problem is simply...

12 hours ago | 0

Answered

how can i store the solution (3D mtarix) and its value for a population of N

So the question is how to store a set of 3D matrices? Why not use a 4D matrix Configs(:,:,:,1)=X1 Configs(:,:,:,2)=X2 ... C...

how can i store the solution (3D mtarix) and its value for a population of N

So the question is how to store a set of 3D matrices? Why not use a 4D matrix Configs(:,:,:,1)=X1 Configs(:,:,:,2)=X2 ... C...

12 hours ago | 0

Answered

creating a curve from XYZ points (centreline) and then split curve into new points

Use a curve fitting function, like lsqcurvefit().

creating a curve from XYZ points (centreline) and then split curve into new points

Use a curve fitting function, like lsqcurvefit().

15 hours ago | 0

Answered

Every point on 2D surface is being transformed by unknown function. How to interpolate coordinates of any point on 2D surface knowing few of them.

If you have a model of the transformation the best approach would be to do a surface fit.

Every point on 2D surface is being transformed by unknown function. How to interpolate coordinates of any point on 2D surface knowing few of them.

If you have a model of the transformation the best approach would be to do a surface fit.

1 day ago | 0

Answered

What does this "fsolve" message tell me?

Does a function evaulation error of (5.95853e-15 ) is not enough for the solution to be correct? Only you can know the answer ...

What does this "fsolve" message tell me?

Does a function evaulation error of (5.95853e-15 ) is not enough for the solution to be correct? Only you can know the answer ...

2 days ago | 2

| accepted

Answered

Vector Comparison According to Entities

[~,~,n]=unique(sort(A,1).','rows'); n=n(:).';

Vector Comparison According to Entities

[~,~,n]=unique(sort(A,1).','rows'); n=n(:).';

2 days ago | 1

| accepted

Answered

different matrix size after 3D interpolation

You could just use imresize3, new_SPECT = imresize3(SPECT, [512,512,263])

different matrix size after 3D interpolation

You could just use imresize3, new_SPECT = imresize3(SPECT, [512,512,263])

2 days ago | 0

Answered

Single-File Object-Oriented Script?

You could just create a static class method that runs what you would normally run in the workspace of the script, classdef some...

Single-File Object-Oriented Script?

You could just create a static class method that runs what you would normally run in the workspace of the script, classdef some...

2 days ago | 0

| accepted

Answered

Is there the more elegant way to do this?

You don't need the switch block. You can just do, items = get(hObject,'String'); index_selected = get(hObject,'Value'); cm ...

Is there the more elegant way to do this?

You don't need the switch block. You can just do, items = get(hObject,'String'); index_selected = get(hObject,'Value'); cm ...

2 days ago | 0

| accepted

Answered

How to find the transformation matrix for a plat knowing the old and new coordinates of 3 points on it ?

You could use this FEX file https://www.mathworks.com/matlabcentral/fileexchange/26186-absolute-orientation-horn-s-method

How to find the transformation matrix for a plat knowing the old and new coordinates of 3 points on it ?

You could use this FEX file https://www.mathworks.com/matlabcentral/fileexchange/26186-absolute-orientation-horn-s-method

2 days ago | 1

Answered

Can you create an array of Constraints in an Optimisation MILP problem?

The error message you are getting occurs when you do things like this, x=optimvar('Xname',252,1); y=optimvar('Xname',252,1); ...

Can you create an array of Constraints in an Optimisation MILP problem?

The error message you are getting occurs when you do things like this, x=optimvar('Xname',252,1); y=optimvar('Xname',252,1); ...

3 days ago | 0

Answered

Can you create an array of Constraints in an Optimisation MILP problem?

You can just write I=1:252; MymodelRP.Constraints.NewEnergyAllocation = ( Eih(I,1)+Eil(I,1)<=Cinew(I,1) );

Can you create an array of Constraints in an Optimisation MILP problem?

You can just write I=1:252; MymodelRP.Constraints.NewEnergyAllocation = ( Eih(I,1)+Eil(I,1)<=Cinew(I,1) );

3 days ago | 0

Answered

Converged to an infeasible point. fmincon stopped because the size of the current step is less than the default value of the step size tolerance but constraints are not satisfied to within the default value of the constraint tolerance.

There are no feasible solutions to your problem because it is impossible to satisfy the first equality constraint, zeros(1,leng...

Converged to an infeasible point. fmincon stopped because the size of the current step is less than the default value of the step size tolerance but constraints are not satisfied to within the default value of the constraint tolerance.

There are no feasible solutions to your problem because it is impossible to satisfy the first equality constraint, zeros(1,leng...

3 days ago | 0

Answered

Find n closest nonzero pixels for every nonzero pixel in an image

Using this information, I need to find the 10 closest nonzero pixels (indexed with their correponding distances to the central p...

Find n closest nonzero pixels for every nonzero pixel in an image

Using this information, I need to find the 10 closest nonzero pixels (indexed with their correponding distances to the central p...

4 days ago | 0

Answered

Interpolate y-values of two data sets on the same axes

ht1=sortrows([height1(:),temperature1(:)]); %pre-sort ht2=sortrows([height2(:),temperature2(:)]); Height=ht1(:,1); Temperat...

Interpolate y-values of two data sets on the same axes

ht1=sortrows([height1(:),temperature1(:)]); %pre-sort ht2=sortrows([height2(:),temperature2(:)]); Height=ht1(:,1); Temperat...

5 days ago | 1

Answered

Creating a vector from two points using 3 coordinates

I think this would complete your code. Times=1:10:length(Data.Time); J=numel(Times); F=nan(J,3); for j = 1:J ...

Creating a vector from two points using 3 coordinates

I think this would complete your code. Times=1:10:length(Data.Time); J=numel(Times); F=nan(J,3); for j = 1:J ...

5 days ago | 0

Answered

Illegal use of reserved keyword "switch"

Your switch block is not enclosed in a method...end block.

Illegal use of reserved keyword "switch"

Your switch block is not enclosed in a method...end block.

5 days ago | 0

Answered

Error using when cell2mat (with string characters)

Try char(Matrix) or string(Matrix)

Error using when cell2mat (with string characters)

Try char(Matrix) or string(Matrix)

5 days ago | 0

| accepted

Answered

Distance of a line by camera points

Well, I have no familiarity with the 3rd party Github library that you're using. However, it is a stereo camera class. So, it sh...

Distance of a line by camera points

Well, I have no familiarity with the 3rd party Github library that you're using. However, it is a stereo camera class. So, it sh...

6 days ago | 0

Answered

roots for nonlinear equation

You need to pose the problem in terms of real numbers only, [ere,fval]=fsolve(@eqns,[1,1]); ere=complex(ere(1),ere(2)) fval, ...

roots for nonlinear equation

You need to pose the problem in terms of real numbers only, [ere,fval]=fsolve(@eqns,[1,1]); ere=complex(ere(1),ere(2)) fval, ...

6 days ago | 0

Answered

How to inherite and intialize object values

What you've shown would work, but you have to actually assign the properties, function obj = outDef(obj1) o...

How to inherite and intialize object values

What you've shown would work, but you have to actually assign the properties, function obj = outDef(obj1) o...

6 days ago | 0

Answered

Gaussian smoothing filtering of 4D data

Does anyone know if Matlab has a function to smooth 4D or 3D data? For 3D data there is imgaussfilt3 (introduced in R2015a).

Gaussian smoothing filtering of 4D data

Does anyone know if Matlab has a function to smooth 4D or 3D data? For 3D data there is imgaussfilt3 (introduced in R2015a).

6 days ago | 0

Answered

Gaussian smoothing filtering of 4D data

imgaussfilt is for 2D only, but it wouldn't be too hard to implement your own 4D separable Gaussian filter just by using my Kron...

Gaussian smoothing filtering of 4D data

imgaussfilt is for 2D only, but it wouldn't be too hard to implement your own 4D separable Gaussian filter just by using my Kron...

6 days ago | 0

Answered

Illegal use of reserved keyword

You have written your code with C-language syntax. Matlab and C are not the same language.

Illegal use of reserved keyword

You have written your code with C-language syntax. Matlab and C are not the same language.

7 days ago | 0

Answered

nonlinear curve fitting a function on data

Are you sure the model isn't supposed to be a Gaussian+constant? It gives a much better fit. I used this FEX file to do the fit...

nonlinear curve fitting a function on data

Are you sure the model isn't supposed to be a Gaussian+constant? It gives a much better fit. I used this FEX file to do the fit...

7 days ago | 1

Answered

scatteredInterpolant in nonlinear system

Try this version, which uses nested functions instead. function nlsystem % my nonlinear system using scatteredInterpolant %...

scatteredInterpolant in nonlinear system

Try this version, which uses nested functions instead. function nlsystem % my nonlinear system using scatteredInterpolant %...

7 days ago | 0

| accepted

Answered

Associate numeric values to object arrays

I think this is what you mean? objectList={A,B,C}; result=objectList(x+1)

Associate numeric values to object arrays

I think this is what you mean? objectList={A,B,C}; result=objectList(x+1)

9 days ago | 0

| accepted

Answered

Genetic Algorithm (GA) with integer, equality and inequality constraint

You can eliminate the equality constraints by using them to solve for some of the variables in terms of the others. If you have ...

Genetic Algorithm (GA) with integer, equality and inequality constraint

You can eliminate the equality constraints by using them to solve for some of the variables in terms of the others. If you have ...

9 days ago | 0

| accepted