5.855 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

Question on Plotting from Cell Array

Points=reshape( [CellArray{:}] ,3,[],10); % for i=1:1000 X=Points(1,i,:); Y=Points(2,i,:); Z=Points(3,i,:)...

Question on Plotting from Cell Array

Points=reshape( [CellArray{:}] ,3,[],10); % for i=1:1000 X=Points(1,i,:); Y=Points(2,i,:); Z=Points(3,i,:)...

ongeveer 4 uur ago | 0

Answered

fsolve: How can I adress my variables to x(1)?

I don't understand your question very well, but maybe it will help to mention that fsolve does not require you to express the fu...

fsolve: How can I adress my variables to x(1)?

I don't understand your question very well, but maybe it will help to mention that fsolve does not require you to express the fu...

ongeveer 4 uur ago | 0

Answered

sum(c*b,'all')>sum(c)*sum(b)

Floating point discrepancies. You cannot count on floating point calculations giving a perfectly accurate result of 1 (unless th...

sum(c*b,'all')>sum(c)*sum(b)

Floating point discrepancies. You cannot count on floating point calculations giving a perfectly accurate result of 1 (unless th...

ongeveer 20 uur ago | 1

| accepted

Answered

Can an object pass a handle to itself?

Yes, you can pass an instance of A to the constructor of each child B. And, if A is a handle class, this will provide each child...

Can an object pass a handle to itself?

Yes, you can pass an instance of A to the constructor of each child B. And, if A is a handle class, this will provide each child...

ongeveer 23 uur ago | 0

| accepted

Answered

Multiple ROI within one slice median calculation

I think this is what you want: I=reshape(Image,[],17); clear Medians for i=1:10 %loop over masks S=regionprops(ma...

Multiple ROI within one slice median calculation

I think this is what you want: I=reshape(Image,[],17); clear Medians for i=1:10 %loop over masks S=regionprops(ma...

ongeveer 23 uur ago | 0

Answered

to find 8 connectivity of an image

https://www.mathworks.com/help/images/ref/bwconncomp.html

to find 8 connectivity of an image

https://www.mathworks.com/help/images/ref/bwconncomp.html

1 dag ago | 0

Answered

covariance between the estimated parameters from curve fitting toolbox

There is lsqcurvefit in the Optimization Toolbox. However, the Curve Fitting Toolbox does let you return the Jacobian, which is ...

covariance between the estimated parameters from curve fitting toolbox

There is lsqcurvefit in the Optimization Toolbox. However, the Curve Fitting Toolbox does let you return the Jacobian, which is ...

1 dag ago | 0

| accepted

Answered

fsolve found wrong solution for easy equation

Choosing an initial guess of x=0 in fsolve is often a bad idea because the gradient of the objective will frequently be zero the...

fsolve found wrong solution for easy equation

Choosing an initial guess of x=0 in fsolve is often a bad idea because the gradient of the objective will frequently be zero the...

1 dag ago | 1

| accepted

Answered

emptying each row of matrix of a in a loop then uses respective matrices produced from it to get a certain value

Why not as follows, b=nan(size(a,1),1); %pre-allocate for i=1:size(a,1) tmp=a; tmp(i,:)=[], b(i)=...

emptying each row of matrix of a in a loop then uses respective matrices produced from it to get a certain value

Why not as follows, b=nan(size(a,1),1); %pre-allocate for i=1:size(a,1) tmp=a; tmp(i,:)=[], b(i)=...

2 dagen ago | 0

Answered

emptying each row of a matrix in a loop

a0=a; for i=1:size(a,1) a=a0; a(i,:)=[], end

emptying each row of a matrix in a loop

a0=a; for i=1:size(a,1) a=a0; a(i,:)=[], end

2 dagen ago | 0

| accepted

Answered

fsolve found wrong solution for easy equation

fzero works better fun=@(x) x^2-1+a/b*log( (b*x^2 -a) / (b-a) ); [sol,fval]= fzero(fun,0) sol = -1.000000128628277 ...

fsolve found wrong solution for easy equation

fzero works better fun=@(x) x^2-1+a/b*log( (b*x^2 -a) / (b-a) ); [sol,fval]= fzero(fun,0) sol = -1.000000128628277 ...

2 dagen ago | 2

Answered

Returning an additional value that is not part of the fitness function or objective for all population evaluation in GA

function run_optimization allSigmas=[]; [xGA,fval] = ga(fun,nvars,[],[],[],[],lowbond,upbond,[],[],options); ...

Returning an additional value that is not part of the fitness function or objective for all population evaluation in GA

function run_optimization allSigmas=[]; [xGA,fval] = ga(fun,nvars,[],[],[],[],lowbond,upbond,[],[],options); ...

2 dagen ago | 0

| accepted

Question

Implicit expansion with empty arrays

I was just idly curious why scalar expansion of an empty array seems to work here (R2018a), >> [1,2,3;4 5 6]-zeros(2,3,0) an...

3 dagen ago | 1 answer | 1

Answered

How to trim segments to fit a square

One solution is to use intersectionHull() from here https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-dimens...

How to trim segments to fit a square

One solution is to use intersectionHull() from here https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-dimens...

3 dagen ago | 1

| accepted

Answered

extracting data from struct(structure within a structure)

This may be what you want, targets=[trials.target]; rows=vertcat(targets.row) but it is not very clear from your post how t...

extracting data from struct(structure within a structure)

This may be what you want, targets=[trials.target]; rows=vertcat(targets.row) but it is not very clear from your post how t...

3 dagen ago | 0

| accepted

Answered

ismembertol does not work as documented

The documentation isn't wrong. You've set a tolerance that can only satisfied reliably at A(6) in infinite precision arithmetic....

ismembertol does not work as documented

The documentation isn't wrong. You've set a tolerance that can only satisfied reliably at A(6) in infinite precision arithmetic....

4 dagen ago | 0

| accepted

Answered

rotation constraint in imregtform

I don't have a clear picture of the "skips" you are refering to, but it vaguely sounds like it could be addressed by setting the...

rotation constraint in imregtform

I don't have a clear picture of the "skips" you are refering to, but it vaguely sounds like it could be addressed by setting the...

4 dagen ago | 0

Answered

How to speed up function approximation?

There are a few inefficiencies that I see. Firstly, you shouldn't pick an arbitrary StartPoint like [0.8,0.8]. The problem can b...

How to speed up function approximation?

There are a few inefficiencies that I see. Firstly, you shouldn't pick an arbitrary StartPoint like [0.8,0.8]. The problem can b...

5 dagen ago | 1

| accepted

Answered

Fit NonLinearLeastSquares to data and constrain curve to pass through point (0,1)

This answer incorporates Torsten's advice, but I also think you should re-formulate the model to make the exponential terms asym...

Fit NonLinearLeastSquares to data and constrain curve to pass through point (0,1)

This answer incorporates Torsten's advice, but I also think you should re-formulate the model to make the exponential terms asym...

5 dagen ago | 0

Answered

Right-truncating a lognormal distribution

I think this is right. How can I code this? function out=conditionalCDF(a,b,x,beta,sigma) pa=normcdf(log(a)-x*beta,0,sig...

Right-truncating a lognormal distribution

I think this is right. How can I code this? function out=conditionalCDF(a,b,x,beta,sigma) pa=normcdf(log(a)-x*beta,0,sig...

6 dagen ago | 1

| accepted

Answered

Coordinate system of matlab

However, i read that Matlab uses two types of coordinate systems which i find really frustrating and confusing at the same time....

Coordinate system of matlab

However, i read that Matlab uses two types of coordinate systems which i find really frustrating and confusing at the same time....

6 dagen ago | 0

| accepted

Answered

How to find the area of the object in the center?

impoly worked pretty well for me. The area in pixels was 1358238 h=impoly(); area=numel(h.createMask) % 1358238

How to find the area of the object in the center?

impoly worked pretty well for me. The area in pixels was 1358238 h=impoly(); area=numel(h.createMask) % 1358238

8 dagen ago | 1

| accepted

Answered

Plot feasible region of a high-dimensional linear programming along some dimensions

I tried to use this without success ... which stops with a long error message that I'm struggling to intepret. The error mess...

Plot feasible region of a high-dimensional linear programming along some dimensions

I tried to use this without success ... which stops with a long error message that I'm struggling to intepret. The error mess...

8 dagen ago | 0

Answered

Quadratic Programming (quadprog):

Using your posted A matrix I find that >> cond(H) ans = 7.5703e+18 For numerical purposes, this is a singular matrix ...

Quadratic Programming (quadprog):

Using your posted A matrix I find that >> cond(H) ans = 7.5703e+18 For numerical purposes, this is a singular matrix ...

8 dagen ago | 0

| accepted

Answered

Increasing the bounds of integration on a strictly positive function decreases the result

A plot of the function reveals highly oscillatory behavior in the interval [-2e-6,0] which then flattens out to zero in [-1,-2e-...

Increasing the bounds of integration on a strictly positive function decreases the result

A plot of the function reveals highly oscillatory behavior in the interval [-2e-6,0] which then flattens out to zero in [-1,-2e-...

8 dagen ago | 0

| accepted

Answered

Can multiple classes share external methods without inheritance?

Is it possible to have external methods that multiple classes share? It sounds like the "external methods" you are trying to im...

Can multiple classes share external methods without inheritance?

Is it possible to have external methods that multiple classes share? It sounds like the "external methods" you are trying to im...

8 dagen ago | 1

Answered

How do I help quadprog converge?

Is checking that the constraints are satisfied and the optimality measure is low a good rule of thumb for making this decision? ...

How do I help quadprog converge?

Is checking that the constraints are satisfied and the optimality measure is low a good rule of thumb for making this decision? ...

9 dagen ago | 0

Answered

Insert desired number of spaces in the string contains numerical value

How about txt="0 STR "+1

Insert desired number of spaces in the string contains numerical value

How about txt="0 STR "+1

10 dagen ago | 0

Answered

Regression of a vector in a optimization problem

As the others have said, all regression routines in the Optimization Toolbox allow you to represent the unknown variable in vect...

Regression of a vector in a optimization problem

As the others have said, all regression routines in the Optimization Toolbox allow you to represent the unknown variable in vect...

11 dagen ago | 0

| accepted