# 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,103

REPUTATION**22,484**

CONTRIBUTIONS

**203** Questions

**8,803** Answers

ANSWER ACCEPTANCE **
75.37%
**

VOTES RECEIVED**2,963**

RANK**253** of 17,375

REPUTATION**5,354**

AVERAGE RATING**4.90**

CONTRIBUTIONS**33** Files

DOWNLOADS **262**

ALL TIME DOWNLOADS**44797**

RANK

of 103,784

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

Solving a nonlinear equation using fsolve. cant reach at perfect result. output showing some error written below.

Result must be around 22-25. but itc coming .0029. As the plot shows, your function has no roots in the range 22-25 p = 1; ...

1 hour ago | 0

Short Length Convolution Speed Up

From the documentation, it appears that the faster performance of fftfilt is indeed expected: When the input signal is relati...

3 hours ago | 0

Short Length Convolution Speed Up

Do you have the Parallel Computing Toolbox and a decently powerful GPU? If so, filter() is enabled for gpuArrays.

5 hours ago | 0

Using mat2cell

You can use mat2tiles from, https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equal-sized-...

6 hours ago | 0

| accepted

Calculate log multiple columns

Your code is correct, assuming Germany_Greece is a matrix and not a table or some other data type.

6 hours ago | 1

| accepted

How to plot these equations ?

Change P(m) to P{m} and Q(m) to Q{m} everwhere. Fs = 1000; % Sampling frequency T = 1/Fs; ...

6 hours ago | 0

| accepted

how can i make 3d image from 2d slices ?

imshow is for displaying 2D images. For 3D images (grayscale), you could use volumeViewer.

6 hours ago | 0

| accepted

Is it possible to reconstruct two 2D images (Front side and left side) to 3D image ?

For a general object, no it's not possible. For an object with some known structure, like a sphere, then yes: measure the radius...

6 hours ago | 0

Elliposid number of faces

You would just access the Value property of the slider in its callback. Then use that value to replot the ellipsoid.

6 hours ago | 0

The pooled covariance matrix of TRAINING must be positive definite.

I suggest you calculate the pooled covariance matrix and verify whether the error message is accurate.

10 hours ago | 0

eig return complex values

It turns out that B=C\A does have real eigenvalues in this particular case, but floating point errors approximations produce a s...

1 day ago | 0

replacing every 30 data points with the mean of them, in an 8 column matrix x 65000 data points. Reshape error

I should be ending up with an 8 x 2166 matrix I assume you mean 2166 x 8. plot_thresh_data=rand(65000,8); [M,N]=size(plot_th...

1 day ago | 0

Finding radius of sphere and circle

The code should look more like this, function [radcircle,radsphere]=calculations(areaCircle,volumeSphere) radCircle=sqrt(ar...

1 day ago | 0

How to reconstruct 3D volume from 2D projections that are generated by same 3D volumetric?

I fyou mean you need to implement your own forward projector, a simple (and not terribly fast) implementation would be with imro...

1 day ago | 0

How can I draw without replacement?

S=[1,2,3,4,5,6,7,8,9,10,0,0,0,0,0,0,0, 0,0,0]; [~,is1]=sort(rand(30,20),2); [~,is2]=sort(rand(30,20),2); result=S([is...

1 day ago | 0

| accepted

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?

A necessary but not sufficient condition for a solution is A2*P-P*A1=0, which is equivalent to K*P(:)=0 where K=kron(I,A2)-kron...

1 day ago | 1

| accepted

About Adding Lines to Your startup.m file

The startup.m file is not a file that ships with Matlab. It needs to be created by you. You can put it anywhere in your permanen...

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

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

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

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

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

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

3 days ago | 0

Efficient matrix multiplication with weights

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

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

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

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

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

4 days ago | 0

| accepted