5,776 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

Is there a difference between declaring a class property "Dependent" versus "Dependent = true"?

Yes, they are equivalent. Also, you can do, properties(~Dependent) aProp end as an equivalent to, properties(Dependent=...

Is there a difference between declaring a class property "Dependent" versus "Dependent = true"?

Yes, they are equivalent. Also, you can do, properties(~Dependent) aProp end as an equivalent to, properties(Dependent=...

3일 ago | 1

| accepted

Answered

How to integrate an unbounded function?

You cantry use the symbolic toolbox, or you could just take the numerical integral over a sufficiently large finite interval. A ...

How to integrate an unbounded function?

You cantry use the symbolic toolbox, or you could just take the numerical integral over a sufficiently large finite interval. A ...

4일 ago | 0

Answered

Optimization solver: retrieval of Constraint matrices

Yes, use prob2struct, https://www.mathworks.com/help/optim/ug/optim.problemdef.optimizationproblem.prob2struct.html

Optimization solver: retrieval of Constraint matrices

Yes, use prob2struct, https://www.mathworks.com/help/optim/ug/optim.problemdef.optimizationproblem.prob2struct.html

4일 ago | 0

Answered

Why output of rotation matrix in Camera Calibration is vector ? What do to convert to rotation matrix ?

A cameraParameters object also has a property that stores the rotations in matrix form https://www.mathworks.com/help/vision/re...

Why output of rotation matrix in Camera Calibration is vector ? What do to convert to rotation matrix ?

A cameraParameters object also has a property that stores the rotations in matrix form https://www.mathworks.com/help/vision/re...

4일 ago | 0

Answered

Find constraints on polynomial coefficients optimization

It might be more natural here to use fseminf, x = fseminf(fun,[a1,a2,a3], 2, @(a,s) seminfcon(a,s,T,lb,ub)); function [c,...

Find constraints on polynomial coefficients optimization

It might be more natural here to use fseminf, x = fseminf(fun,[a1,a2,a3], 2, @(a,s) seminfcon(a,s,T,lb,ub)); function [c,...

4일 ago | 0

Answered

Find constraints on polynomial coefficients optimization

What's to figure out? You've already articulated that the (nonlinear) constraints on the extremum are, 0<=-a2/(2*a1)<=T The on...

Find constraints on polynomial coefficients optimization

What's to figure out? You've already articulated that the (nonlinear) constraints on the extremum are, 0<=-a2/(2*a1)<=T The on...

4일 ago | 0

Answered

fmincon generating (very) noisy results - initial guesses probably to blame

If you're suspicious about the initial point, I would recommend MultiStart, or just try lots of different initial guesses yourse...

fmincon generating (very) noisy results - initial guesses probably to blame

If you're suspicious about the initial point, I would recommend MultiStart, or just try lots of different initial guesses yourse...

4일 ago | 0

Answered

Constraint of optimization problem

It's the wrong solver. You would need to use ga() for a problem like that.

Constraint of optimization problem

It's the wrong solver. You would need to use ga() for a problem like that.

5일 ago | 0

| accepted

Answered

How to normalise a FFT of a 3 variable function.

To normalize so as to obtain Discrete Fourier Series coefficients, divide by N=numel(input).

How to normalise a FFT of a 3 variable function.

To normalize so as to obtain Discrete Fourier Series coefficients, divide by N=numel(input).

5일 ago | 0

Answered

How to normalise a FFT of a 3 variable function.

To normalize so that the continuous Fourier transform is approximated, multiply by the sampling intervals, dT1*dT2*dT3

How to normalise a FFT of a 3 variable function.

To normalize so that the continuous Fourier transform is approximated, multiply by the sampling intervals, dT1*dT2*dT3

5일 ago | 0

Answered

How to normalise a FFT of a 3 variable function.

To normalize so that Parseval's equation holds, divide by sqrt(numel(input)).

How to normalise a FFT of a 3 variable function.

To normalize so that Parseval's equation holds, divide by sqrt(numel(input)).

5일 ago | 0

Answered

Subtract according to the values in another column

[~,i]=unique([C1,C1(end+1)],'stable'); result = C2(i(2:end)-1)-C2(i(1:end-1))

Subtract according to the values in another column

[~,i]=unique([C1,C1(end+1)],'stable'); result = C2(i(2:end)-1)-C2(i(1:end-1))

5일 ago | 0

Answered

Can we use scatteredinterpolant in parallel

You can certainly divide queries into parallel batches, e.g., F=scatteredInterpolant(P,v); results=cell(size(batch)); parfo...

Can we use scatteredinterpolant in parallel

You can certainly divide queries into parallel batches, e.g., F=scatteredInterpolant(P,v); results=cell(size(batch)); parfo...

5일 ago | 0

Answered

Can parallel computing toolbox not parallellise over multiple CPUs?

12 is the upper limit if you are using a version of Matlab earlier than R2014a, see also https://www.mathworks.com/matlabcentra...

Can parallel computing toolbox not parallellise over multiple CPUs?

12 is the upper limit if you are using a version of Matlab earlier than R2014a, see also https://www.mathworks.com/matlabcentra...

6일 ago | 0

Answered

Conditional Skip in for loop

Apply the suggestions in this thread to A=logical(x)+1.

Conditional Skip in for loop

Apply the suggestions in this thread to A=logical(x)+1.

6일 ago | 0

| accepted

Answered

How to plot Intensity profile along the vertical line of an image

y = [0 size(I,1)]; x = [size(I,2)/2 size(I,2)/2];

How to plot Intensity profile along the vertical line of an image

y = [0 size(I,1)]; x = [size(I,2)/2 size(I,2)/2];

6일 ago | 0

| accepted

Answered

Find first three numbers in a matrix that satisfy the condition x>0.001

B=find(A(:,1)>0.001,3)

Find first three numbers in a matrix that satisfy the condition x>0.001

B=find(A(:,1)>0.001,3)

6일 ago | 0

| accepted

Answered

Why do I get no solution found in Fsolve despite the results match my nonlinear equations ?

You're asking for guesses? Because you are not plugging the solution into the same equations that were given to fsolve. fsolve t...

Why do I get no solution found in Fsolve despite the results match my nonlinear equations ?

You're asking for guesses? Because you are not plugging the solution into the same equations that were given to fsolve. fsolve t...

9일 ago | 1

| accepted

Answered

Export residuals from curve fitting

Instead of using cftool, use the fit() command, [fitobject,gof,output] = fit(x,y,'poly1','Weights', w); residuals=output.res...

Export residuals from curve fitting

Instead of using cftool, use the fit() command, [fitobject,gof,output] = fit(x,y,'poly1','Weights', w); residuals=output.res...

9일 ago | 0

| accepted

Answered

Export residuals from curve fitting

For a simple 1 degree polynomial, why not just use polyfit? p=polyfit(x,y,1); residuals=polyval(p,x)-y;

Export residuals from curve fitting

For a simple 1 degree polynomial, why not just use polyfit? p=polyfit(x,y,1); residuals=polyval(p,x)-y;

9일 ago | 0

Answered

error using fminbnd with multiple objective function

A few problems fminbnd cannot minimize functions of more than one unknown variable All Matlab minimization routines e.g. fmins...

error using fminbnd with multiple objective function

A few problems fminbnd cannot minimize functions of more than one unknown variable All Matlab minimization routines e.g. fmins...

9일 ago | 1

Answered

How can I NOT specify the constraint function in the ga function?

Any of the constraint arguments can be left empty to signify to ga that there are no constraints of that type, e.g., x = ga(fun...

How can I NOT specify the constraint function in the ga function?

Any of the constraint arguments can be left empty to signify to ga that there are no constraints of that type, e.g., x = ga(fun...

10일 ago | 1

Answered

alpha shape vs convex hull volume value

Because the convex hull and an alpha shape are not necessarily the same shape. The alpha shape, in particular, depends on the al...

alpha shape vs convex hull volume value

Because the convex hull and an alpha shape are not necessarily the same shape. The alpha shape, in particular, depends on the al...

10일 ago | 0

Answered

How do I calculate the numerical Jacobian for a set of six non linear equations ?

Jac=nan(3,3); %pre-allocate Jac(1,:) = 2*[ x(1)-h1 , x(2)-v1 , x(3)-w1 ]; Jac(2,:) = 2*[ x(1)-h2 , x(2)-v2 , x...

How do I calculate the numerical Jacobian for a set of six non linear equations ?

Jac=nan(3,3); %pre-allocate Jac(1,:) = 2*[ x(1)-h1 , x(2)-v1 , x(3)-w1 ]; Jac(2,:) = 2*[ x(1)-h2 , x(2)-v2 , x...

10일 ago | 1

| accepted

Answered

How to loop a objective function using the optimization toolbox?

My objective function is built on the decision variable so that the objective function is for one time period as well. You cann...

How to loop a objective function using the optimization toolbox?

My objective function is built on the decision variable so that the objective function is for one time period as well. You cann...

10일 ago | 0

| accepted

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

10일 ago | 0

| accepted

Answered

Calling variables into objective function

There is, but the far better way is to use anonymous or nested functions, as covered here https://www.mathworks.com/help/optim/...

Calling variables into objective function

There is, but the far better way is to use anonymous or nested functions, as covered here https://www.mathworks.com/help/optim/...

11일 ago | 0

Answered

Issues about Using Function 'fmincon' solve Optimization Problem

tol = 1.0E-13; This is an incredibly tight tolerance - possibly at the limit of double float precision, depending on the order ...

Issues about Using Function 'fmincon' solve Optimization Problem

tol = 1.0E-13; This is an incredibly tight tolerance - possibly at the limit of double float precision, depending on the order ...

11일 ago | 0

| accepted

Answered

Curve Fitting (polynomial fitting and interpolation)

fit() will return a fitobject, which you can use to evaluate the surface at any point you wish zq=fitobject(xq,yq) It's import...

Curve Fitting (polynomial fitting and interpolation)

fit() will return a fitobject, which you can use to evaluate the surface at any point you wish zq=fitobject(xq,yq) It's import...

11일 ago | 0

Answered

How to sum over 3 dimensional cell array, where each cell also contains cells?

I'm tempted to ask how this data got to be a cell array, when it should really have been a 3x6x6x645 numeric array. We can fix t...

How to sum over 3 dimensional cell array, where each cell also contains cells?

I'm tempted to ask how this data got to be a cell array, when it should really have been a 3x6x6x645 numeric array. We can fix t...

11일 ago | 0

| accepted