Community Profile

photo

Matt J


5,254 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
Why always NaNs in my script?
Because you are interpolating at locations outside the boundaries defined by x_grid,y_grid. The locations where you interpolate,...

약 8시간 ago | 0

| accepted

Question


Decompose an N-dimensional array into outer products
The SVD gives us a way to decompose a square matrix A into a sum of outer products with a minimal number of terms. In other word...

약 12시간 ago | 0 answers | 0

0

answers

Answered
Problem passing function to lsqnonlin with costant parameters
par1=______; par2=______; par3=______; lsqnonlin(@(x) myfunction(x,par1,par2,par3), __________); See also Passing ...

1일 ago | 2

| accepted

Answered
Creating Convolution Matrix of 2D Kernel for Different Shapes of Convolution
Readability and clarity over performance. OK, can't get much simpler and more readable then the following: function [ mK ] = C...

1일 ago | 1

Answered
Creating Convolution Matrix of 2D Kernel for Different Shapes of Convolution
You could also use the convn method of my ndSparse class (Download). function [ mK ] = CreateImageConvMtx( mH, nRows, nCols, co...

1일 ago | 0

Answered
Creating Convolution Matrix of 2D Kernel for Different Shapes of Convolution
You can use my func2mat (Download) utility. It will find the matrix form of any linear function and doesn't require any toolbox...

1일 ago | 0

Answered
How to use GPU and CPU simultaneously in a for loop ?
You can't make the CPU and GPU do alternating loop iterations, but you can divide the slices of A into two batches, and make the...

2일 ago | 1

| accepted

Answered
Converting scalar equations to Vector Equations
Use the vectorize command.

2일 ago | 0

| accepted

Answered
How can I implement cubic interpolation in Gradient Descent algorithm?
Since you have an analytical formula for z(x,y), why don't you just use that to calculate Z and its gradient exactly? Why are yo...

2일 ago | 0

Answered
Sequences for a 3D matrix
k=ones(1,1,2)/2; result = sum( convn(A,k,'valid')>.999 ,3 );

2일 ago | 0

Answered
how to divide image into 5*5 blocks
A more efficient method than blockproc or mat2cell is to use sepblockfun (Download), result = sepblockfun(~yourImage,[60,60],'...

3일 ago | 0

Answered
Integrate with Simpson's Rule
It doesn't look like you xi should be involved, since you already have the samples of f I = h/3*(f((1))+2*sum(f((3:2:end-2)))+4...

3일 ago | 0

| accepted

Answered
How can I fit two functions simultaneously with lsqnonlin?
Replace your ^ operators with .^

6일 ago | 0

| accepted

Answered
Maximising the summation of a matrix elements along to generated trajectory by nonlinear global optimization
If fij is always binary, it seems very peculiar not to pose this as a least squares curvefit. If f is not binary (or even if i...

6일 ago | 0

Answered
How to solve "Error while using repmat : out of memory"
Forget about repmats. Use the original sq and w as follows, tmp=reshape( reshape(sq,[],nd)*w , size(sq) ); raw = c...

12일 ago | 1

| accepted

Answered
How do I add shadings when overlapping polygons?
Why not just create a grayscale image? t= linspace(0,1,300); [X,Y]=meshgrid(t); sz=size(X); X=X(:);Y=Y(:); I=xy.isi...

12일 ago | 0

| accepted

Answered
Reconstruction of points position in 3D from 2D image
i was wondering about the fact that points are symmetric. Does this not add any info?... Can this help to reconstruct at least t...

13일 ago | 0

| accepted

Answered
How to constrain the lower and upper bounds in lsqcurvefit?
This seems to work okay, for i=1:2 [xdata,is]=sort(realpart(:, i)); ydata=imaginarypart(is, i); fun=@(m,xdata) (...

14일 ago | 0

| accepted

Answered
Creating a number board from a matrix
You could also use uitable, e.g., f = figure; t = uitable(f,'Data',A,'Position',[20 20 262 204]);

14일 ago | 0

Answered
Creating a number board from a matrix
You could just do openvar A

14일 ago | 0

Answered
How to use The Minimum Error Thresholding method for CT images using Matlab?
You could pre-map your input image to have the intensity range expected by your code using imadjust, J = imadjust(I,[low_in...

15일 ago | 0

| accepted

Question


Sampling with periodic replacement
I am looking for an efficient way of doing randperm(n,k) many successive times with the same n and k. Can anyone propose somethi...

16일 ago | 1 answer | 0

1

answer

Answered
how to detect empty rows and columns from 3-D matrix and crop them?
tmp=any(Frames,3); I = any(tmp,2); J= any(tmp,1); Frames=Frames(I,J,:);

16일 ago | 1

| accepted

Answered
How to solve a revised quadratic program problem
Use fmincon. Be careful as well of the non-differentiability of the function at x=0. You should introduce a constraint that keep...

16일 ago | 1

| accepted

Answered
Pixel position is bigger than image dimension or negative using pinhole camera model
Here are a few errors that I can deduce from your description: You say that the point is "right in front of the camera" and tha...

19일 ago | 2

| accepted

Answered
how to use genetic algorithm to solve these problems Using Genetic algorithm Toolbox ?
This page talks about how to set specific options programmatically in the ga command: https://www.mathworks.com/help/gads/optio...

19일 ago | 0

Answered
Is there any way of working out the coordinates at D? AD and BD are perpendicular and in the plane ABC.
Is there any way of working out the coordinates at D? ... AD and BD are not necessarily equal in length Without a condition on ...

19일 ago | 0

Answered
Minimization of a function
See lsqlin.

21일 ago | 0

| accepted

Answered
what is the maximum diameter of convex polygons ?
You can prove it using some theorems below from convex analysis. You should be able to find them in any convex analysis text, bu...

21일 ago | 1

Load more