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

How to fit some curves to one curve in which only the maximum of curves are fitted?

Generate the maximum of all your curves and use alphashape() to smooth over concavities in its envelope.

How to fit some curves to one curve in which only the maximum of curves are fitted?

Generate the maximum of all your curves and use alphashape() to smooth over concavities in its envelope.

12 hours ago | 0

Answered

Using fmincon on a vector of anonymous functions

I would recommend that you implement E(A) through a non-anonymous function, as below. Note that I have changed your objective to...

Using fmincon on a vector of anonymous functions

I would recommend that you implement E(A) through a non-anonymous function, as below. Note that I have changed your objective to...

1 day ago | 0

| accepted

Answered

find whole lines, not line segments, after hough transform

If you have the Computer Vision Toolbox, you can try RANSAC, as in this example https://www.mathworks.com/help/vision/ref/ransa...

find whole lines, not line segments, after hough transform

If you have the Computer Vision Toolbox, you can try RANSAC, as in this example https://www.mathworks.com/help/vision/ref/ransa...

2 days ago | 0

Answered

estimate depth with two different focal lengths

Why should it matter that the focal lengths are different? There is nothing in the syntax of the triangulate command https://ww...

estimate depth with two different focal lengths

Why should it matter that the focal lengths are different? There is nothing in the syntax of the triangulate command https://ww...

2 days ago | 0

| accepted

Answered

I would be grateful to receive some example of usage of builtin function 'regionprops'

Because I don't have R2019b, I had to run a somewhat modified version of the code S=load('BWCurve.mat','CBW'); BW=S.CBW; % Ge...

I would be grateful to receive some example of usage of builtin function 'regionprops'

Because I don't have R2019b, I had to run a somewhat modified version of the code S=load('BWCurve.mat','CBW'); BW=S.CBW; % Ge...

2 days ago | 0

| accepted

Answered

How to solve the problem about "Conversion to logical from optim.problemdef.OptimizationConstraint is not possible!"

Introduce variables r to represent bounds on Pbatt r=optimvar('absPbatt',simTime1,'LowerBound',0); prob.Constraints.r_upper=...

How to solve the problem about "Conversion to logical from optim.problemdef.OptimizationConstraint is not possible!"

Introduce variables r to represent bounds on Pbatt r=optimvar('absPbatt',simTime1,'LowerBound',0); prob.Constraints.r_upper=...

2 days ago | 0

Answered

Fminsearchbnd vs. Pattern Search vs. Surrogate Optimzation to attempt to find the global optimal solution.

There is no way to predict the number of multi-starts you would need to make fminsearchbnd behave competitively with the other s...

Fminsearchbnd vs. Pattern Search vs. Surrogate Optimzation to attempt to find the global optimal solution.

There is no way to predict the number of multi-starts you would need to make fminsearchbnd behave competitively with the other s...

2 days ago | 0

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

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

9 days 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

9 days ago | 0

| accepted

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

9 days 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,...

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

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

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

10 days 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).

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

10 days 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)).

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

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

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

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

12 days 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];

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

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

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

14 days 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;

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

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

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

15 days ago | 0