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.

답변 있음

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

약 9시간 전 | 0

답변 있음

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

약 9시간 전 | 0

답변 있음

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

약 19시간 전 | 0

| 수락됨

답변 있음

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;

1일 전 | 0

답변 있음

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

1일 전 | 0

답변 있음

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

1일 전 | 0

답변 있음

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

3일 전 | 2

| 수락됨

답변 있음

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

3일 전 | 0

답변 있음

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

4일 전 | 0

| 수락됨

답변 있음

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

4일 전 | 0

| 수락됨

답변 있음

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

4일 전 | 1

답변 있음

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

4일 전 | 0

| 수락됨

답변 있음

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

4일 전 | 0

| 수락됨

답변 있음

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

4일 전 | 2

답변 있음

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

4일 전 | 2

| 수락됨

답변 있음

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

5일 전 | 0

답변 있음

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

5일 전 | 0

답변 있음

Divide plane into two separate planes

Let b1 and b2 be basis vectors for the plane and let x0 be a point in the plane. Then, for example, x0(:) + b1(:)*randn(1,N) + ...

Divide plane into two separate planes

Let b1 and b2 be basis vectors for the plane and let x0 be a point in the plane. Then, for example, x0(:) + b1(:)*randn(1,N) + ...

6일 전 | 0

답변 있음

how to plot values that only fall within a range?

KPH_70 = mean(Y(FVY)); yyaxis left plot(X(FVY),Y(FVY)); yyaxis right plot(X(FVY),KPH_70*ones(size(FVY)));

how to plot values that only fall within a range?

KPH_70 = mean(Y(FVY)); yyaxis left plot(X(FVY),Y(FVY)); yyaxis right plot(X(FVY),KPH_70*ones(size(FVY)));

6일 전 | 0

| 수락됨

답변 있음

How to pass a vector to a function that creates matrix

>> b=[1 2 3]*10; >> T=@(i) [b(i)+9 , 8 ; 8 , 7 ]; >> T(3) ans = 39 8 8 7

How to pass a vector to a function that creates matrix

>> b=[1 2 3]*10; >> T=@(i) [b(i)+9 , 8 ; 8 , 7 ]; >> T(3) ans = 39 8 8 7

6일 전 | 0

답변 있음

how to calculate direction in rotated coordinate system

Using AxelRot (Download), and assuming all angles are given in radians, [x,y,z] = sph2cart(Azi_Old,Elev_Old,1); P=AxelRot( ...

how to calculate direction in rotated coordinate system

Using AxelRot (Download), and assuming all angles are given in radians, [x,y,z] = sph2cart(Azi_Old,Elev_Old,1); P=AxelRot( ...

6일 전 | 0

답변 있음

How to work with Nelder-Mead algorithm with 7 unknown variables?

You can use fminsearch (an implementation of Nelder-Mead) with any number of variables. However, there is no way to gaurantee th...

How to work with Nelder-Mead algorithm with 7 unknown variables?

You can use fminsearch (an implementation of Nelder-Mead) with any number of variables. However, there is no way to gaurantee th...

6일 전 | 2

답변 있음

f(x)=sin(x)-x^5=0 providing x is not equals 0 ,function in the interval x [0,3]

>> [x0,fval]=fzero(@(x)sin(x)-x.^5,[0.8,1]) x0 = 0.9610 fval = -1.1102e-16

f(x)=sin(x)-x^5=0 providing x is not equals 0 ,function in the interval x [0,3]

>> [x0,fval]=fzero(@(x)sin(x)-x.^5,[0.8,1]) x0 = 0.9610 fval = -1.1102e-16

6일 전 | 0

| 수락됨

답변 있음

Generating Toeplitz Matrix which Matches the Convolution Shape Same

Using interpMatrix (Download), nH=numel(vH); nX=numel(vX); ic=ceil( (nH+1)/2); mH = interpMatrix(vH,ic , nX,1);

Generating Toeplitz Matrix which Matches the Convolution Shape Same

Using interpMatrix (Download), nH=numel(vH); nX=numel(vX); ic=ceil( (nH+1)/2); mH = interpMatrix(vH,ic , nX,1);

7일 전 | 0

답변 있음

Generating Toeplitz Matrix which Matches the Convolution Shape Same

I am specifically asking about using the function toeplitz(). If it must be with toeplitz, then: nH=numel(vH); nX=numel(vX); ...

Generating Toeplitz Matrix which Matches the Convolution Shape Same

I am specifically asking about using the function toeplitz(). If it must be with toeplitz, then: nH=numel(vH); nX=numel(vX); ...

7일 전 | 0

| 수락됨

답변 있음

Concatenating matrices in a file into another matrix

For example, >> p1=[1,2,3]; p2=[4 5 6]; p3=[7 8 9]; save p p1 p2 p3 >> A=cell2mat(struct2cell(load('p'))) A = 1 ...

Concatenating matrices in a file into another matrix

For example, >> p1=[1,2,3]; p2=[4 5 6]; p3=[7 8 9]; save p p1 p2 p3 >> A=cell2mat(struct2cell(load('p'))) A = 1 ...

7일 전 | 0

| 수락됨

답변 있음

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.240406e-24.

Even with A\B, you cannot expect reliable behavior with RCOND as small as 2.240406e-24. For all intents and purposes, your mat...

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.240406e-24.

Even with A\B, you cannot expect reliable behavior with RCOND as small as 2.240406e-24. For all intents and purposes, your mat...

7일 전 | 0

답변 있음

Fit a conic section without mirror image hyperbola

This approach uses John's fminspleas FEX submission (Download). Although the fit is, technically, a hyperbola, it diverges to a ...

Fit a conic section without mirror image hyperbola

This approach uses John's fminspleas FEX submission (Download). Although the fit is, technically, a hyperbola, it diverges to a ...

7일 전 | 1

답변 있음

rotating and saving images to folder: error during loop

The code works fine for me. If I had to guess, I would say it is because you ran the code previously while debugging and never c...

rotating and saving images to folder: error during loop

The code works fine for me. If I had to guess, I would say it is because you ran the code previously while debugging and never c...

7일 전 | 0

답변 있음

Defining constraints in the Quadratic Programming

If you have a quadratic function of only 1 unknown variable, it should be possible to find the minimum analytically - no iterati...

Defining constraints in the Quadratic Programming

If you have a quadratic function of only 1 unknown variable, it should be possible to find the minimum analytically - no iterati...

7일 전 | 0