# Matt J

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.

**Statistics**

RANK**6**

of 249 642

REPUTATION**22 370**

CONTRIBUTIONS

**202** Questions

**8 763** Answers

ANSWER ACCEPTANCE **
75.25%
**

VOTES RECEIVED**2 953**

RANK**253** of 17 360

REPUTATION**5 347**

AVERAGE RATING**4.90**

CONTRIBUTIONS**33** Files

DOWNLOADS **256**

ALL TIME DOWNLOADS**44733**

RANK

of 103 371

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Integral of the product of integrals

I=@(y,f) integral( @(x)f(x,y), a, b); I123=@(y) I(y,f1) .* I(y,f2) .* I(y,f3); integral(I123, c, d)

environ 3 heures ago | 0

How can I find the distance between adjacent blobs in a segmented image?

Here's one way. mask=imclose(mask, strel('disk',12) ); imshow(mask) blobProps = regionprops( mask , 'Centroid'); blob...

environ 3 heures ago | 0

Solving Equaiton with multplying power

LHS=[0 0 1; -1 0 0; 1 1 -3]; RHS=[0;1;-3]; XYZ=LHS\RHS

environ 22 heures ago | 1

How to only extract part of the folder name?

str='Run 12-27-56.Adaptive PIV.6uqqm6yu' d2=digitsPattern(2); extract(str,d2+"-"+d2+"-"+d2)

2 jours ago | 1

| accepted

How do you reset a persistent variable?

dpb 's answer resolved it..

2 jours ago | 0

| accepted

How to remove rows in a nested for loop?

discard=ismembertol(Original_center,Detected_center,Threshold,'ByRows',1,'DataScale',1); Original_center(discard,:)=[];

2 jours ago | 0

How to turn a function handle with 3 inputs (1 variable and 2 parameters) and then assign the inputs parameters and get a function handle with one input? ?

But, this is computationally very expensive for my super big expressions. What if you use the optimize flag? g=matlabFunction...

2 jours ago | 0

Question

How do you reset a persistent variable?

The documentaiton says that a persistent variable is reset when the function is cleared from memory. Why then do I not see the p...

2 jours ago | 1 answer | 0

### 1

answerA very strange problem

An alternative solution is to download afslim() from, https://www.mathworks.com/matlabcentral/fileexchange/45749-memory-efficie...

2 jours ago | 1

Convolution using convn does not give expected result

There's no reason to think convolution in general won't increase the values. As a trivial example: A=ones(5); B=convn(A,2,'s...

2 jours ago | 0

How using a script of variables in a parfor loop ?

Does scriptOfVariables use the loop counter i in any way? If not, you should move it outside the loop, scriptOfVariables; parf...

3 jours ago | 0

does convex hull intersect?

You can use intersectionHull() from https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-dimensional-convex-pol...

3 jours ago | 1

| accepted

I am using GA optimization tool but while simulation ran i is not terminating even introduced stopping criteria

The "options" variable that you've created is never used. You did not pass it to ga().

3 jours ago | 1

Reversing the cumtrapz function

One way, using func2mat from, https://www.mathworks.com/matlabcentral/fileexchange/44669-func2mat-convert-linear-function-to-ma...

4 jours ago | 0

fmincon; produces different answers against theoretically the same question ...

I thought the Optimization Toolbox solvers now preprocess the linear constraints in A,b, Aeq,beq to see if any can be re-express...

5 jours ago | 0

How can I use a for loop to find multiple minimum values in a matrix array?

A=data(1:end-3); B=data(2:end-2); C=data(3:end-1); D=data(4:end); locations=find(A>B & B>C & C<D)+2,

5 jours ago | 0

How can I use a for loop to find multiple minimum values in a matrix array?

You are not using the loop variable i anywhere.

5 jours ago | 0

Counter inside parfor loop

You need to learn to use struct arrays. If you have your fixed input parameters and outputs be the fields of structs, you can av...

5 jours ago | 0

| accepted

Can somebody solve this question. I've been trying for 2 hours straight. Didn't get it yet

Hint: Notice that the volume is the difference of two simpler volumes V1-V2, where V1 is the volume of revolution of sqrt(x) on...

5 jours ago | 0

Index exceeds matrix dimensions error?

Pt=( L(:,1)-L(:,2) )./L(:,3)

5 jours ago | 0

| accepted

Find all IDs in pointLocation for point located on boundary of polygon.

If it's a convex cloud, you can just use convhull(). If it is not convex, then you need to define what you mean by the boundary,...

5 jours ago | 0

Define a regression equation that can be recalled as a fitness function in optimization toolbox

function out = multiObjective(x) r = x(:,1); theta = x(:,2); h1 = x(:,3); h2 = x(:,4); j = 14.1456...

5 jours ago | 0

how to calculate the long axis of mesh in 3D

One possibility is to fit a cylinder or a 3D line to the surface samples. You can use cylindricalFit() or linear3dFit() availabl...

5 jours ago | 0

Fit sphere into mesh which has a spherical shape

Isolate the end caps of the bone by finding the triangles in the mesh whose surface normals [nx,ny,nz] point strongly upward (nz...

5 jours ago | 0

MATLAB Curve fitting with custom equation (max/min)

It is better not to use a custom equation when one is not needed. Just fit the 'sin1' model to y-k. fitobject = fit(x,y-k,'sin1...

6 jours ago | 1

| accepted

Calculate the convolution of signals both directly and using DFT.

The DFT only agrees with linear (not circulant) convolution when sufficient zero padding is done. It doesn't appear that you hav...

6 jours ago | 0

Scatter plot in parfor loop

Parfor workers do not have display capability, but you can gather the data in the loop and plot it after the loop.

6 jours ago | 0

How to convert cell to matrix

cell2mat should have worked A=num2cell(rand(100001,2)); whos A B=cell2mat(A); whos B

6 jours ago | 0

Function findobj does not find an object (?)

h = findobj(gcf,'Type', 'Scatter');

6 jours ago | 0

Why the amplitude of Ram-Lak filter is multiplied by 2 in iradon transform?

Perhaps it is different from what you expect because the backprojection sums only from 0 to 180 degrees. If you summed from 0 to...

6 jours ago | 0