# 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 250.022

REPUTATION**22.454**

CONTRIBUTIONS

**203** Questions

**8.787** Answers

ANSWER ACCEPTANCE **
75.37%
**

VOTES RECEIVED**2.960**

RANK**253** of 17.371

REPUTATION**5.353**

AVERAGE RATING**4.90**

CONTRIBUTIONS**33** Files

DOWNLOADS **270**

ALL TIME DOWNLOADS**44789**

RANK

of 103.724

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

5x5 matrix (P) with all 25 values unknown. I have two known matrices of size 5x5 each (A1 and A2) and the relation P*A1*inv(P)=A2. How do I obtain P?

Rewrite the equaion as P(A2-A1)=0 which is equivalent to kron((A2-A1).',eye(5))*P(:)=0. This can be solved with null(). d=lengt...

24 minutos ago | 0

About Adding Lines to Your startup.m file

A startup.m file needs to be created by you. It can go anywhere in your permanent Matlab path. By permanent, I mean folders that...

37 minutos ago | 0

How to judge the relatively stable section in the curve

One possibility might be to look at the local span seminorm (max-min) over a sliding window. window=50; lookahead = movmax(cu...

alrededor de 18 horas ago | 0

Is it possible to reconstruct an image from the number of pixel counts and bins information?

As Walter has shown, it is not an invertible mapping, however, if you use histcounts() instead, there is enough information for ...

1 día ago | 1

how to find total combination of 5 elements in composition?

Here's an old routine from John D'Errico. I can't find it on the File Exchange anymore, for some reason. combinations=diophanti...

1 día ago | 0

| accepted

How to remove rows in a nested for loop?

It should start with the column (and therefore the Detected_center point) with the overall shortest distance to a Original_cent...

1 día ago | 0

Efficient matrix multiplication with weights

A more memory efficient solution is as follows. It has a loop, but is still highly vectorized. Wt=W.'; At=A.'; T=toeplitz(1:N...

2 días ago | 0

| accepted

Is applying a binary operator (+,-,*,/) to char arrays supported by MATLAB or just a "trick"

I can't find the documentation, but binary operators in Matlab can't define themselves. It had to be deliberate. Also, the char...

2 días ago | 0

Efficient matrix multiplication with weights

Using sepblockfun() from, https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-operations T=toepli...

2 días ago | 0

Losing pixels with imrotate

So my question was: is there any other way to rotate the images without losing pixels? If you use 'linear' or 'cubic' interpol...

2 días ago | 0

| accepted

Calculate average between min and max numbers in column 3 depending on values in column 2, for each value in column 1

A=yourMatrix; idx=A(:,1)==7; B=A(idx,:); [~,idx]=maxk(B(:,2),5); C=B(idx,3); result=0.5*(max(C)+min(C))

2 días ago | 1

| accepted

Iteratively fill structure with custom class objects

I'm puzzled as to why your custom_class() constructor requires the same input argument twice, but this is how I'd do it. rows =...

2 días ago | 0

Count the number of times a value repeats between certain rows in a matrix.

A=[2,5,15,65,102; 2,65,1,105,55; 65,104,15,19,5]; skip=1; A1=A(1:end-skip,:); A2=A(skip+1:end,:); M=size(...

3 días ago | 0

| accepted

How to write an optimization constraint related to neighbors of a node in a graph

You can get the graph adjacency matrix A from the adjacency() command, https://www.mathworks.com/help/matlab/ref/graph.adjacenc...

3 días ago | 0

| accepted

Complex non-linear least squares fitting of impedance data

Because your model function is linear with respect to x(1) and 1/x(2), it would be beneficial to download fminspleas, https://w...

3 días ago | 0

random matrix with a minimum number difference for adjacent numbers accepted

Why not as follows? min_diff=0.1; R=rand(1,6); R=R./min(abs(diff(R)))*min_diff; abs(diff(R))

3 días ago | 0

I need to change the frequency domain of a DFT

stem(2*pi*f,abs(shx),'r')

3 días ago | 1

| accepted

Count number of rows in a matrix based on frequency of one element and value of another element

nnz( matrix(:,1) == 10 & matrix(:,2) > 5 );

5 días ago | 0

| accepted

How to improve calculation time for a huge matrix?

When speed matters, avoid symbolic math. Also, download https://www.mathworks.com/matlabcentral/fileexchange/74956-ndgridvecs ...

5 días ago | 0

How to remove rows in a nested for loop?

For Euclidean distance, discard=any( pdist2(Original_center,Detected_center)<Threshold ,2); Original_center(discard,:)=[];...

5 días ago | 0

Creating a inclined plane with an adjustable dome pattern cutout of it.

You can rotate and replicate the single dome using hgtransform, similar to this example, https://www.mathworks.com/help/matlab/...

5 días ago | 0

Question

Height of a figure spontaneously changes.

When I run the following code, I find that the OuterPosition properties of both figures report the same height and width, as exp...

5 días ago | 2 answers | 0

### 2

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

6 días ago | 0

| accepted

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

6 días ago | 0

Solving Equaiton with multplying power

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

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

7 días ago | 1

| accepted

How do you reset a persistent variable?

dpb 's answer resolved it..

8 días ago | 0

| accepted