# 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 257,889

REPUTATION**24,108**

CONTRIBUTIONS

**215** Questions

**9,400** Answers

ANSWER ACCEPTANCE **
74.88%
**

VOTES RECEIVED**3,169**

RANK**250** of 17,768

REPUTATION**5,494**

AVERAGE RATING**4.90**

CONTRIBUTIONS**33** Files

DOWNLOADS **389**

ALL TIME DOWNLOADS**46076**

RANK

of 110,111

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**3** Highlights

AVERAGE NO. OF LIKES**2**

**Content Feed**

How to count numbers greater than a determined value

out = cumsum( histcounts(heights,0.5:0.1:100-eps(100)) ,'reverse');

1 hour ago | 0

Change initial step length in fmincon

You have some control over the step distance used for finite differencing operations (through FiniteDifferenceStepSize), and for...

3 hours ago | 0

Meshgrid orthogonal to a line in 3D Space

You can also start with an unrotated grid, then rotate it: d=[1;1;1]; d=d(:).'/norm(d); [X,Y,Z]=meshgrid(-5:5); R=[d;null...

5 hours ago | 0

Meshgrid orthogonal to a line in 3D Space

There are also ready-made File Exchange tools you can use, like this one d=[1;1;1]; %direction of line d=d(:)./norm(d); gtP...

5 hours ago | 0

Meshgrid orthogonal to a line in 3D Space

Pick a 3D direction vector for the straight line, e.g. d=[1,1,1]; Then, d=d(:)./norm(d); B=null(d.'); %basis [x...

6 hours ago | 0

how can i plot a continuous unit step function without heaviside?

Hint: t=linspace(-1,3,100); u=(t>1); plot(t,u); axis padded; xlabel t; ylabel u

12 hours ago | 0

| accepted

Calculate mean value of every element of a .mat file

S = structfun( @mean, load('yourFile.mat'),'uni',0); matrix=cell2mat(struct2cell(S));

12 hours ago | 0

program that performs 3D geometric transformations

imwarp will probably do most of the heavy-lifting for you. It's not clear to me what is meant by "More than one transformation s...

1 day ago | 0

How to avoid hessian being 0 in fminunc(maximum likelihood estimation)?

Operations in the objective function like this, min(.999999,normcdf(e_inside(t,i)) are technically illegal, since min(a,b) is ...

1 day ago | 0

Question

Automatic numbering and cross-referencing of sections in Live Script

I am investigating the possibility of having automatic section numbering and cross-references in Live Script. Here is an example...

1 day ago | 1 answer | 0

### 1

answerCombining two matrices with different sizes

M3=zeros(600,2,7); M3(230:598,:,:)=M2; M3(250:2:600,:,:)=M1; %replace M2 with M1 M3(1:2:end,:,:)=0;%odd numbers are zer...

1 day ago | 0

How can i run this code? I get erros "Unable to perform assignment because the size of the left side is 1-by-600 and the size of the right side is 1-by-100."

for j=1:numel(H) for i= 1:numel(T) Tx = T(i); Hx = H(j); P(i,:,j) = fvdWEOSp(Tx,V,Hx); end ...

1 day ago | 0

multi array vectorization problem (reformulated)

runtest(1e2) function runtest(N) A = [ -0.8013 -0.4981; -0.2278 -0.9009]; t = 0:0.01:N; b = [2;3]; [V,d]=eig(A,'v...

1 day ago | 1

| accepted

Change the location of points in a 2D meshgrid

location=location+rand(size(location))*0.3+0.2;

2 days ago | 0

| accepted

How to formulate the following matrices?

T=makehgtform('translate',[x(i),y(i),0],'zrotate',theta(i)); T=T([1,2,4],[1,2,4])

2 days ago | 1

| accepted

bwlabeln 3D connections not a subset of its 2D connections

My guess is that the 4-connected regions are indeed subsets of the 26-connected regions, as you expect. However, in the 26-conne...

3 days ago | 1

| accepted

Imposing Constraint in FMINCON optimization problem.

x0 = zeros(1,N_plies); lb = [-ones(1,N_plies)*90 zeros(1,N_plies)]; ub = [ones(1,N_plies)*90 ones(1,N_plies)*t]; Aeq=zeros...

3 days ago | 1

| accepted

How to Multiply the following matrices case?

T=rand(3,3,18); D=rand(3,1,18); M=pagemtimes(T,D(:,:)); M(:,logical(eye(18)))=[]; M=reshape(M,3,17,18); whos M

3 days ago | 0

| accepted

How to create a matrix?

Do you mean this? [lat,long]=ndgrid(-89.75:89.75,0.25:359.75);

4 days ago | 0

| accepted

Merge rows based on conditions in the coulmns

T=varfun(@(x) [x(:)',nan(1,4-numel(x))],readtable('dmp.txt'),'Group',[9,1]); T=T(:,[2,4:10,1])

4 days ago | 0

Problems while trying to fit a 4-variable function with lsqcurvefit

voigt_func =@(x,xdata) x(1).*(2.*log(2)./pi.^(3./2)).*(x(2)./x(3).^2)... .*integral(@(t) (exp(-t.^2))./((sqrt(log(2)).*(...

4 days ago | 0

| accepted

Error using polyfit (line 44) The first two inputs must have the same number of elements

Take a look at this.

4 days ago | 0

What is the best way set the search interval used by fminbnd?

Your minimization problem is really a root-finding problem in disguise. It is better to use fzero for such things. As you can se...

4 days ago | 0

| accepted

Submitted

Further tools for analyzing objects in N-dimensional images

A collection of tools to supplement bwpropfilt, bwareaopen, and the like.

4 days ago | 4 downloads |

What is the best way set the search interval used by fminbnd?

and I have had to "cheat" by setting the search interval to something that more tightly bounds the known correct answers for my ...

4 days ago | 0

Finding close-to-linear solution

Pre-transpose c before the optimization to avoid repeatng the tranpose every iteration. ct=c'; function outer(p,ct) E0 = ...

4 days ago | 0

| accepted

I am trying to use the function fmincon for multiple nonlinear inequality constraints, and the output given does not satisfy all the inequality constraint

As a general rule, you should avoid nonlinear constraints when they have a linear equivalent. In your case, the nonlinear constr...

4 days ago | 0

Vectorize loop to speed up

The operations look like IFFTs, though possibly you have irregular time and frequency sampling. Even so, you should possibly co...

4 days ago | 0