5.512 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

What is lambda in lsqcurvefit?

The lambda returned by lsqcurvefit are not Levenberg-Marquardt parameters. They are the Lagrange multiplers at the solution. If ...

What is lambda in lsqcurvefit?

The lambda returned by lsqcurvefit are not Levenberg-Marquardt parameters. They are the Lagrange multiplers at the solution. If ...

etwa 4 Stunden ago | 0

Answered

How fmincon shifts x0 when it does not strictly satisfy the upper and lower bounds?

I don't know precisely how the shifting algorithm works, but I think it's safe to assume that it is independent of the objective...

How fmincon shifts x0 when it does not strictly satisfy the upper and lower bounds?

I don't know precisely how the shifting algorithm works, but I think it's safe to assume that it is independent of the objective...

ein Tag ago | 0

Answered

Find matrix rows that have 3 common values, store the rows and the values

I'll call your original 5 column matrix A. D=cell(4,1); a5=A(:,5); As=sort(A(:,1:4),2); for i=1:4 %small loop ...

Find matrix rows that have 3 common values, store the rows and the values

I'll call your original 5 column matrix A. D=cell(4,1); a5=A(:,5); As=sort(A(:,1:4),2); for i=1:4 %small loop ...

ein Tag ago | 0

| accepted

Answered

fminunc stopped because it cannot decrease the objective function along the current search direction.

You will need to use a dedicated function for computing the log-sigmoid. Combining log and sigmoid as separate functions is nume...

fminunc stopped because it cannot decrease the objective function along the current search direction.

You will need to use a dedicated function for computing the log-sigmoid. Combining log and sigmoid as separate functions is nume...

2 Tage ago | 0

Answered

Issues in Matrix multiplication

A somewhat less efficient solution (but which uses no 3rd party files) is, A=rand(6,6,100); B=rand(6,1,100); C=sum( A.*reshap...

Issues in Matrix multiplication

A somewhat less efficient solution (but which uses no 3rd party files) is, A=rand(6,6,100); B=rand(6,1,100); C=sum( A.*reshap...

2 Tage ago | 1

Answered

Issues in Matrix multiplication

Use mtimesx from the File Exchange https://www.mathworks.com/matlabcentral/fileexchange/25977-mtimesx-fast-matrix-multiply-with...

Issues in Matrix multiplication

Use mtimesx from the File Exchange https://www.mathworks.com/matlabcentral/fileexchange/25977-mtimesx-fast-matrix-multiply-with...

2 Tage ago | 0

Answered

Extract rectangular grid from triangulation

I think you are looking for griddata().

Extract rectangular grid from triangulation

I think you are looking for griddata().

3 Tage ago | 0

Answered

How do I get the mean of always 4 columns

One way is using sepblockfun, downloadable from here https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block...

How do I get the mean of always 4 columns

One way is using sepblockfun, downloadable from here https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block...

3 Tage ago | 0

Answered

Compute an Orthogonal Matrix

No, this is generally not possible. When all the eigenvalues of A are distinct, for example, the (orthonormalized) eigenvectors ...

Compute an Orthogonal Matrix

No, this is generally not possible. When all the eigenvalues of A are distinct, for example, the (orthonormalized) eigenvectors ...

4 Tage ago | 0

Answered

how i can find these branching point

[I,J] = find(binaryimg<max(binaryimg(:))/2); IJ = [I,J]; [~,idx] = min(IJ*[1 1; -1 1; 1 -1; -1 -1].'); Corners = IJ(idx,:); ...

how i can find these branching point

[I,J] = find(binaryimg<max(binaryimg(:))/2); IJ = [I,J]; [~,idx] = min(IJ*[1 1; -1 1; 1 -1; -1 -1].'); Corners = IJ(idx,:); ...

4 Tage ago | 0

Answered

I am trying to find the corners of the "rectangular" shapes. This code is working very well. But I dont know exactly how it works. Can you explain me ??

Maybe this image will help. The corners of a polyhedron will maximize/minimize the intercept of lines of a certain slope - it's ...

I am trying to find the corners of the "rectangular" shapes. This code is working very well. But I dont know exactly how it works. Can you explain me ??

Maybe this image will help. The corners of a polyhedron will maximize/minimize the intercept of lines of a certain slope - it's ...

4 Tage ago | 0

| accepted

Answered

Create a free cubic spline that passes some certain points

The spline command would be one way https://www.mathworks.com/help/matlab/ref/spline.html

Create a free cubic spline that passes some certain points

The spline command would be one way https://www.mathworks.com/help/matlab/ref/spline.html

4 Tage ago | 0

Answered

values of equation in last iteration in fmincon

The computation of xw1 is a trivial one-liner. Just compute it separately from the optimal X given to you by fmincon, xw1=sum( ...

values of equation in last iteration in fmincon

The computation of xw1 is a trivial one-liner. Just compute it separately from the optimal X given to you by fmincon, xw1=sum( ...

4 Tage ago | 0

Answered

Overlaying and Comparing Two Sets of Co-Ordinates

I haven't used it myself, but this implementation of Iterative Closest Point seems pretty popular https://www.mathworks.com/mat...

Overlaying and Comparing Two Sets of Co-Ordinates

I haven't used it myself, but this implementation of Iterative Closest Point seems pretty popular https://www.mathworks.com/mat...

4 Tage ago | 0

Answered

two conditions on two 8*256 matrices

There are lots of knapsack problem solvers on the File Exchange https://www.mathworks.com/matlabcentral/fileexchange?q=knapsack...

two conditions on two 8*256 matrices

There are lots of knapsack problem solvers on the File Exchange https://www.mathworks.com/matlabcentral/fileexchange?q=knapsack...

5 Tage ago | 0

Answered

Combining cells within a cell array that have intersecting values

You should just represent your shapes as polyshape objects. Then it is easy to weed out redundant vertices using the simplify()...

Combining cells within a cell array that have intersecting values

You should just represent your shapes as polyshape objects. Then it is easy to weed out redundant vertices using the simplify()...

6 Tage ago | 1

| accepted

Answered

Curve fitting & Plotting On Logarithmic y, linear x

You can change the scale of the plot from linear to log just by doing hAx.YScale='log'; where hAx is a handle to your axis.

Curve fitting & Plotting On Logarithmic y, linear x

You can change the scale of the plot from linear to log just by doing hAx.YScale='log'; where hAx is a handle to your axis.

6 Tage ago | 0

Answered

Skip empty array in plot legend?

Why not something like this? allLines=[a,b,c,d]; allStrings={'blue line', 'level1', 'level2', 'exceed const lims'}; leg...

Skip empty array in plot legend?

Why not something like this? allLines=[a,b,c,d]; allStrings={'blue line', 'level1', 'level2', 'exceed const lims'}; leg...

6 Tage ago | 0

Answered

can I run the Optimization Toolbox purchased in 2014 with the Matlab 2017a?

No, you cannot mix toolboxes from different Matlab versions.

can I run the Optimization Toolbox purchased in 2014 with the Matlab 2017a?

No, you cannot mix toolboxes from different Matlab versions.

6 Tage ago | 0

Answered

The fastest way to check if a sparse matrix is singular or not?

condest(A)

The fastest way to check if a sparse matrix is singular or not?

condest(A)

6 Tage ago | 0

| accepted

Answered

simulation-based non-linear constrainted multiobjective optimization, any suggestions to which solver to use?

1) See Objective and Nonlinear Constraints in the Same Function. 2) If ga takes too much time and pareto search is the only oth...

simulation-based non-linear constrainted multiobjective optimization, any suggestions to which solver to use?

1) See Objective and Nonlinear Constraints in the Same Function. 2) If ga takes too much time and pareto search is the only oth...

7 Tage ago | 0

| accepted

Answered

Is it possible to preserve the runtime of functions within a parfor loop? Or keep them more consistent?

You would probably have to parallelize them across a cluster, rather than on a single multicore machine.

Is it possible to preserve the runtime of functions within a parfor loop? Or keep them more consistent?

You would probably have to parallelize them across a cluster, rather than on a single multicore machine.

7 Tage ago | 1

Answered

Store While Loop Output in Vector

while i<n i=i+1; thetak(i)=input('Enter Orientation Angle: '); end

Store While Loop Output in Vector

while i<n i=i+1; thetak(i)=input('Enter Orientation Angle: '); end

7 Tage ago | 0

| accepted

Answered

Find NaN in a cell array and only delete the NaNs

results(j)= sqrt( mean(array{j}.^2,'omitnan') );

Find NaN in a cell array and only delete the NaNs

results(j)= sqrt( mean(array{j}.^2,'omitnan') );

7 Tage ago | 2

| accepted

Answered

lsqcurvefit help: Function value and YDATA sizes are not equal.

[fitpars, resnorm] = lsqcurvefit(@PO_PK2comp,par0,tdata,ydata.');

lsqcurvefit help: Function value and YDATA sizes are not equal.

[fitpars, resnorm] = lsqcurvefit(@PO_PK2comp,par0,tdata,ydata.');

7 Tage ago | 0

| accepted

Answered

Accessing to Variables with Incremental Names in a Loop

streamAll = arrayfun(@(i) evalin('caller',['stream', num2str(i)]) , 1:N )

Accessing to Variables with Incremental Names in a Loop

streamAll = arrayfun(@(i) evalin('caller',['stream', num2str(i)]) , 1:N )

7 Tage ago | 0

Answered

Parameter estimation with fminsearch and ODE23s

See here for general guidelines, https://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equat...

Parameter estimation with fminsearch and ODE23s

See here for general guidelines, https://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equat...

8 Tage ago | 0

Answered

draw multiple lines based on coordinates

See here for an example using a digraph object, https://www.mathworks.com/help/matlab/ref/digraph.html#mw_26035adf-ff90-4a33-a8...

draw multiple lines based on coordinates

See here for an example using a digraph object, https://www.mathworks.com/help/matlab/ref/digraph.html#mw_26035adf-ff90-4a33-a8...

8 Tage ago | 1

| accepted