Community Profile

photo

Matt J


5,515 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.

Contact

Matt J's Badges

  • Master
  • Revival Level 4
  • 36 Month Streak
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer

View details...

Contributions in
View by

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)

8 hours ago | 0

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?

3 days ago | 0

| accepted

Answered
How to compute the homography
tform = projective2d(H); newImage = imwarp(oldImage,tform);

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

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

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

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

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

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

5 days ago | 0

Answered
Move logical array by one
id2=circshift(id1,-1)

6 days ago | 0

| accepted

Answered
Extract rectangular grid from triangulation
I think you are looking for griddata().

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

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

7 days ago | 0

Answered
How to calculate covariace of two random variable
cov(x(:),y(:))

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

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

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

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

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

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

8 days 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()...

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

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

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

10 days ago | 0

Answered
The fastest way to check if a sparse matrix is singular or not?
condest(A)

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

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

10 days ago | 1

Answered
Store While Loop Output in Vector
while i<n i=i+1; thetak(i)=input('Enter Orientation Angle: '); end

10 days ago | 0

| accepted

Answered
Find NaN in a cell array and only delete the NaNs
results(j)= sqrt( mean(array{j}.^2,'omitnan') );

10 days ago | 2

| accepted

Answered
lsqcurvefit help: Function value and YDATA sizes are not equal.
[fitpars, resnorm] = lsqcurvefit(@PO_PK2comp,par0,tdata,ydata.');

10 days ago | 0

| accepted

Load more