5.525 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 can i Product Mathematical functions ?

f= @(x) x^2+x+1; for i=1:N r(i)=_______; f=@(x) f(x)./(x-r(i)); end

How can i Product Mathematical functions ?

f= @(x) x^2+x+1; for i=1:N r(i)=_______; f=@(x) f(x)./(x-r(i)); end

alrededor de 5 horas ago | 0

Answered

Vectorized rotation of 3D gridded volumes

Maybe this is what you're looking for? [XYZ{1:3}] = meshgrid(x,y,0); V = cat(4, XYZ{:}); sz=size(V); V = reshape(V,[],3)*...

Vectorized rotation of 3D gridded volumes

Maybe this is what you're looking for? [XYZ{1:3}] = meshgrid(x,y,0); V = cat(4, XYZ{:}); sz=size(V); V = reshape(V,[],3)*...

alrededor de 6 horas ago | 0

Answered

Is there a way to use the RMS function with two options, namely 'omitnan' and an option for the dimension?

Here's a better workaround. In this implementation, all the same input syntax options as for mean() are available. function out...

Is there a way to use the RMS function with two options, namely 'omitnan' and an option for the dimension?

Here's a better workaround. In this implementation, all the same input syntax options as for mean() are available. function out...

alrededor de 8 horas ago | 1

Answered

Conditional function on matrix

vals=[1,10,5]; Kd=vals( discretize(Kt,[-inf,0.2,1.09*c2,+inf]) );

Conditional function on matrix

vals=[1,10,5]; Kd=vals( discretize(Kt,[-inf,0.2,1.09*c2,+inf]) );

1 día ago | 1

| accepted

Answered

HELP DIFFERENT LINESTYLE ON THE SAME CURVE

Just split x,y into two subsets and plot each subset as a separate line: idx=x<50; x1=x(idx); y1=y(idx); x2=x(~idx); y2=y(~id...

HELP DIFFERENT LINESTYLE ON THE SAME CURVE

Just split x,y into two subsets and plot each subset as a separate line: idx=x<50; x1=x(idx); y1=y(idx); x2=x(~idx); y2=y(~id...

1 día ago | 0

| accepted

Answered

Convert cell arrays to 4-D array

Where C is your cell array: M = reshape( cat(3,C{:}) , [256,256,10,35]) EDIT: Or M = reshape( cat(3,C{:}) , [256,256,35,10...

Convert cell arrays to 4-D array

Where C is your cell array: M = reshape( cat(3,C{:}) , [256,256,10,35]) EDIT: Or M = reshape( cat(3,C{:}) , [256,256,35,10...

1 día ago | 0

| accepted

Answered

Ax=b question

You could use intlinprog. Assuming WNLOG that the manipulated b value is b(1), N=numel(b); f=[-1,zeros(1,N)].'; Aeq=[+100*f...

Ax=b question

You could use intlinprog. Assuming WNLOG that the manipulated b value is b(1), N=numel(b); f=[-1,zeros(1,N)].'; Aeq=[+100*f...

2 días ago | 0

Answered

Cross Product of an Array

This way avoids repmatting, which may be desirable when N is large. M = your 3xN matrix v = your 3x1 vector result=xprodmat...

Cross Product of an Array

This way avoids repmatting, which may be desirable when N is large. M = your 3xN matrix v = your 3x1 vector result=xprodmat...

2 días ago | 0

Answered

expectation of random numbers

You can't do it. The D(i) are statistically independent, and so offer no information about what comes next.

expectation of random numbers

You can't do it. The D(i) are statistically independent, and so offer no information about what comes next.

2 días ago | 0

| accepted

Answered

I keep getting the message: Unbalanced or unexpected parenthesis or bracket. How would I fix it? I'm trying to solve for the maximum and minimum with a function and it's constraint.

The error message tells you where to look: Line: 11 Column: 21

I keep getting the message: Unbalanced or unexpected parenthesis or bracket. How would I fix it? I'm trying to solve for the maximum and minimum with a function and it's constraint.

The error message tells you where to look: Line: 11 Column: 21

2 días ago | 0

Answered

How can I mean multiple matrices, element by element in a n*n cell array?

If I call your cell array C, M=cell2mat(reshape(C,1,16,[])); result = mean(M,2)

How can I mean multiple matrices, element by element in a n*n cell array?

If I call your cell array C, M=cell2mat(reshape(C,1,16,[])); result = mean(M,2)

3 días ago | 0

| accepted

Answered

Failure in initial objective function evaluation. FSOLVE cannot continue.

Instead of XN, in this line F(1) = Xn2 + Xo2 + Xo + XN + Xno - 1; should it be Xn?

Failure in initial objective function evaluation. FSOLVE cannot continue.

Instead of XN, in this line F(1) = Xn2 + Xo2 + Xo + XN + Xno - 1; should it be Xn?

5 días ago | 0

| accepted

Answered

How to compute the homography

tform = projective2d(H); newImage = imwarp(oldImage,tform);

How to compute the homography

tform = projective2d(H); newImage = imwarp(oldImage,tform);

5 días ago | 1

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

6 días ago | 0

| accepted

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

7 días 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 ...

7 días 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...

8 días 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...

8 días 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...

8 días 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().

9 días 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...

9 días 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 ...

10 días ago | 0

Answered

How to calculate covariace of two random variable

cov(x(:),y(:))

How to calculate covariace of two random variable

cov(x(:),y(:))

10 días ago | 0

| accepted

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

10 días 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 ...

10 días 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

10 días 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( ...

10 días 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...

10 días 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...

11 días ago | 0