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

Constraining Function in fmincon

It sounds like you need to apply a nonlinear constraint. If so, you need to use fmincon with 9 or more input arguments specified...

Constraining Function in fmincon

It sounds like you need to apply a nonlinear constraint. If so, you need to use fmincon with 9 or more input arguments specified...

25 Minuten ago | 0

Answered

how to create a symmetric Toeplitz matrix with bounds on eigenvalues?

R=fft(eye(400))/sqrt(400); e=zeros(1,400); e(2)=-10; e(end-1)=+10; e=ifftshift(e); T=(R'*diag(e)*R); T=real((T+T.')/2);...

how to create a symmetric Toeplitz matrix with bounds on eigenvalues?

R=fft(eye(400))/sqrt(400); e=zeros(1,400); e(2)=-10; e(end-1)=+10; e=ifftshift(e); T=(R'*diag(e)*R); T=real((T+T.')/2);...

3 Tage ago | 1

| accepted

Answered

optimization problem wont find any solutions

The problem is infeasible, or your initial guess x0 is too far from a feasible point.

optimization problem wont find any solutions

The problem is infeasible, or your initial guess x0 is too far from a feasible point.

3 Tage ago | 0

Answered

making coarse matrix from fine resolution matrix

A 3rd approach, more memory conserving and faster,. Z1=randi(100,8640,4320); u = 5; %upsampling factor d = 12; %...

making coarse matrix from fine resolution matrix

A 3rd approach, more memory conserving and faster,. Z1=randi(100,8640,4320); u = 5; %upsampling factor d = 12; %...

4 Tage ago | 1

| accepted

Answered

3D image template matching by using (normalized) cross correlation?

I've never used it myself , but you could try this FEX submission, https://www.mathworks.com/matlabcentral/fileexchange/73946-n...

3D image template matching by using (normalized) cross correlation?

I've never used it myself , but you could try this FEX submission, https://www.mathworks.com/matlabcentral/fileexchange/73946-n...

4 Tage ago | 0

| accepted

Answered

making coarse matrix from fine resolution matrix

If you have the Image Processing Toolbox, abc1=imresize(Z1,[3600,1800])

making coarse matrix from fine resolution matrix

If you have the Image Processing Toolbox, abc1=imresize(Z1,[3600,1800])

4 Tage ago | 1

Answered

find the element in matrix of intersecting vectors

attainedA=( max(a,[],1)==a ); attainedB=( max(b,[],2)==b ); result = c(attainedA & attainedB)

find the element in matrix of intersecting vectors

attainedA=( max(a,[],1)==a ); attainedB=( max(b,[],2)==b ); result = c(attainedA & attainedB)

4 Tage ago | 1

| accepted

Answered

Quadprog message: The problem is non-convex

You cannot submit a problem that is borderline convex to quadprog if it is using an algorithm that expects convexity. If you do,...

Quadprog message: The problem is non-convex

You cannot submit a problem that is borderline convex to quadprog if it is using an algorithm that expects convexity. If you do,...

4 Tage ago | 0

Answered

How to define a plane by matrices instead of a function?

For example, A = [104,122,111]; B = [253,122,153]; C = [104,124,111]; normal=normalize( cross(A-B,A-C),'norm'); %calcul...

How to define a plane by matrices instead of a function?

For example, A = [104,122,111]; B = [253,122,153]; C = [104,124,111]; normal=normalize( cross(A-B,A-C),'norm'); %calcul...

5 Tage ago | 1

| accepted

Answered

When using the cftool, should I use Trust Region or Levenberg-Marquardt?

You can read here about the relative limitations of the 2 algorithms, https://www.mathworks.com/help/optim/ug/lsqcurvefit.html#...

When using the cftool, should I use Trust Region or Levenberg-Marquardt?

You can read here about the relative limitations of the 2 algorithms, https://www.mathworks.com/help/optim/ug/lsqcurvefit.html#...

5 Tage ago | 0

| accepted

Answered

Need Math to Rotate XYZ Point Around A-B Rotary Axes

See Rodrigues' formula, https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula Also, though you are apparently not worki...

Need Math to Rotate XYZ Point Around A-B Rotary Axes

See Rodrigues' formula, https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula Also, though you are apparently not worki...

5 Tage ago | 0

Answered

How to run fmincon using following function?

With no constraints, it would simply be, x=ones(200)/(-c*B);

How to run fmincon using following function?

With no constraints, it would simply be, x=ones(200)/(-c*B);

6 Tage ago | 0

| accepted

Answered

No solution found when solving 3 non linear equations

A numerical sweep also gives evidence that there is no solution [x1,x2,x3]=ndgrid(linspace(-pi,+pi,512)); F1=cos(-x1+x2)+c...

No solution found when solving 3 non linear equations

A numerical sweep also gives evidence that there is no solution [x1,x2,x3]=ndgrid(linspace(-pi,+pi,512)); F1=cos(-x1+x2)+c...

6 Tage ago | 0

Answered

How do you call an inline or anonymous function within cellfun?

I reverted back to the for loop This might be faster than the for-loop, allB=[B{:}]; idx=ismember(allB,A); Blens=cellfun('l...

How do you call an inline or anonymous function within cellfun?

I reverted back to the for loop This might be faster than the for-loop, allB=[B{:}]; idx=ismember(allB,A); Blens=cellfun('l...

7 Tage ago | 1

Answered

How do you call an inline or anonymous function within cellfun?

But would still like to know how to use anonymous functions within cellfun There's no difference. Since findVal is already a fu...

How do you call an inline or anonymous function within cellfun?

But would still like to know how to use anonymous functions within cellfun There's no difference. Since findVal is already a fu...

7 Tage ago | 0

| accepted

Answered

Converged to an infeasible point.

The initial guess you have chosen x0 = [1,1,1,1,1,1,1,1]; seems very arbitrary. You should devise an initial guess more likely...

Converged to an infeasible point.

The initial guess you have chosen x0 = [1,1,1,1,1,1,1,1]; seems very arbitrary. You should devise an initial guess more likely...

7 Tage ago | 0

| accepted

Answered

Matrix sequence manipulation for multiple value assignment

e=1:numel(A); lidx= any(idxes(:,1)<=e & e<=idxes(:,2),1); A(lidx)=1;

Matrix sequence manipulation for multiple value assignment

e=1:numel(A); lidx= any(idxes(:,1)<=e & e<=idxes(:,2),1); A(lidx)=1;

8 Tage ago | 0

Answered

Matrix sequence manipulation for multiple value assignment

If the intervals will always be disjoint, A=zeros(20,1); n=numel(A); A(idxes(:,1))=1; A(idxes(:,2)+1)=-1; A=cumsum(A(1:n)...

Matrix sequence manipulation for multiple value assignment

If the intervals will always be disjoint, A=zeros(20,1); n=numel(A); A(idxes(:,1))=1; A(idxes(:,2)+1)=-1; A=cumsum(A(1:n)...

8 Tage ago | 0

Answered

Getting the coordinates of vertices of an A4 sheet with coins on it, for its further projective transformation and coin detection

The Computer Vision Toolbox has a few corner point detector apps, https://www.mathworks.com/help/vision/ug/point-feature-types....

Getting the coordinates of vertices of an A4 sheet with coins on it, for its further projective transformation and coin detection

The Computer Vision Toolbox has a few corner point detector apps, https://www.mathworks.com/help/vision/ug/point-feature-types....

8 Tage ago | 0

Answered

Relocate a value of a vector.

A=[1 2 3 4 5 6 7 8 9 0]; i=2; %position removed j=7; %target position B=A; k=i<j; B(i)=inf; C = [B(1:j+k-1),A(i),...

Relocate a value of a vector.

A=[1 2 3 4 5 6 7 8 9 0]; i=2; %position removed j=7; %target position B=A; k=i<j; B(i)=inf; C = [B(1:j+k-1),A(i),...

10 Tage ago | 2

| accepted

Answered

table less than operator

Are you sure you do not instead want to compare the content of a variable in the table to something?... yes this what I'm trying...

table less than operator

Are you sure you do not instead want to compare the content of a variable in the table to something?... yes this what I'm trying...

10 Tage ago | 0

Answered

Why is N not being displayed?

Because the loop condition is never satisfied and therefore nothing within it is ever executed. I think you meant to have, whil...

Why is N not being displayed?

Because the loop condition is never satisfied and therefore nothing within it is ever executed. I think you meant to have, whil...

10 Tage ago | 0

| accepted

Answered

Displaying information about the data set by clicking on its plot and then show a value that is associated with the (x,y) point

.... set(dcm,'UpdateFcn',@(t,e) myupdatefcn(t,e,x,y) ); function txt = myupdatefcn(~,event,xdata,ydata) pos = get(eve...

Displaying information about the data set by clicking on its plot and then show a value that is associated with the (x,y) point

.... set(dcm,'UpdateFcn',@(t,e) myupdatefcn(t,e,x,y) ); function txt = myupdatefcn(~,event,xdata,ydata) pos = get(eve...

10 Tage ago | 0

| accepted

Answered

Getting the linear portion of a non-linear curve

I'm not sure why a 2nd derivative test wouldn't have worked, as long as your points are noiseless: i=find( abs(diff(x,2))>somet...

Getting the linear portion of a non-linear curve

I'm not sure why a 2nd derivative test wouldn't have worked, as long as your points are noiseless: i=find( abs(diff(x,2))>somet...

10 Tage ago | 1

Answered

How to return the smallest vector.

If you "have them" in cell array form, then you could do something like this: >> vectors={[3 4 5],[1,2],[5 6 7 8]} vectors =...

How to return the smallest vector.

If you "have them" in cell array form, then you could do something like this: >> vectors={[3 4 5],[1,2],[5 6 7 8]} vectors =...

11 Tage ago | 0

| accepted

Answered

a problem with setting fmincon options?

I would guess that you entered your options object as the 9th input argument to fmincon when it really should be the 10th. If yo...

a problem with setting fmincon options?

I would guess that you entered your options object as the 9th input argument to fmincon when it really should be the 10th. If yo...

11 Tage ago | 0

| accepted

Answered

set Precision in lsqcurvefit

You cannot do such a thing with lsqcurvefit. What you describe would require that you rewrite your objective function and bounds...

set Precision in lsqcurvefit

You cannot do such a thing with lsqcurvefit. What you describe would require that you rewrite your objective function and bounds...

11 Tage ago | 2

Answered

Delete part of an image

[m,n]=size(oldImage); x=(1:n); y=(1:m).'; mask = (x-innerCenterX).^2+(y-innerCenterY).^2>=innerRadius^2 & ... (x...

Delete part of an image

[m,n]=size(oldImage); x=(1:n); y=(1:m).'; mask = (x-innerCenterX).^2+(y-innerCenterY).^2>=innerRadius^2 & ... (x...

11 Tage ago | 2

| accepted

Answered

Find the orientation of the skeletonized image

You can use houghlines to get the endpoints of all the line segments in the image. From that, you can easily calculate their slo...

Find the orientation of the skeletonized image

You can use houghlines to get the endpoints of all the line segments in the image. From that, you can easily calculate their slo...

11 Tage ago | 0

Answered

Using cell array to define Argument list in function Handle

That is not the right approach. You should be taking advantage of the fact that this is Matlab, and that your variables are allo...

Using cell array to define Argument list in function Handle

That is not the right approach. You should be taking advantage of the fact that this is Matlab, and that your variables are allo...

12 Tage ago | 0