Community Profile

photo

Matt J


5,433 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 is det(x) better than rcond(x) in determining non-singularity here?
rcond is telling you how easy it is to invert a set of linear equations based on x. det() does not give you that kind of inform...

약 6시간 ago | 1

Answered
Constraining fit to two-variable function
My question is, how do I constrain the fit so that H(r,eta) does not go above 1? Polynomials cannot be bounded everywhere. You ...

약 7시간 ago | 1

| accepted

Answered
inconsistent linear system of equation
You can find the least squares solution to a linear system of equation A*x=b using backslash x_leastsquares = A\b

1일 ago | 0

Answered
find first line that satisfies condition; skip next few; then find next line that satisfies condition
idx = diff([0;TTL_column(:)>4.8])>0; TTL_column(idx) = 10000;

1일 ago | 0

| accepted

Answered
how to solve many polynomial equations listed in a matrix?
Here's a method withoutt loops, [a,b,c]=deal(A(:,1),A(:,2),A(:3)); D=sqrt(b.^2-4.*a.*c); I=[-b-D, -b+D]./(2.*a);

1일 ago | 0

Answered
Generating a matrix based on an equation with conditions
For example, >> A=zeros(10,1); A(1:5)=4; A(6:10)=3 A = 4 4 4 4 4 3 3 3 ...

3일 ago | 1

| accepted

Answered
Create an accurate boundary around 2D point cloud horizontal plane
You can use alphaShape.

3일 ago | 0

Answered
Interpolating a 3D Matrix using interp1
Using my KronProd class (Download) m=14; p=221; A = rand(m,m,p) ; M=40; %new XY dimension B=interp1(eye(m),linspace(1,m,M),...

4일 ago | 0

Answered
Can I use Optimization tool like fmincon or ga etc if I have constraint optimization problem that optimization variable cannot be within a range inside upper and lower limit?
Example : suppose I am solving an optimization problem where x should be within 1 and 10 or 29 and 99. The feasible space for x...

4일 ago | 0

| accepted

Answered
Finding a pixel location after imrotate
Well, the center of the image in your example is at c=[512.5;340]; and the rotation matrix expressing the rotation is R=[cosd...

4일 ago | 1

| accepted

Answered
Adding constraints to lsq fitting
Any chance you could modify the code without the weighting function and with the new data? Note that this means rdf_contact and ...

4일 ago | 0

Answered
Adding constraints to lsq fitting
Here is an adaptation of the algebraic solution that I presented in your previous thread. I don't bother with the lsqcurvefit a...

5일 ago | 2

Answered
initlalize several variables at once
Just to sum things up here, below is my implementation of the fit, combining all my various recommendations. Both the algebraic ...

5일 ago | 1

Answered
initlalize several variables at once
One other thing I would point out is the model function you have shown us here is linear in the coefficients. This means that it...

5일 ago | 1

Answered
How to automatically constrain some of the unknown values in an optimization problem?
I will assume you have some binary vector v which indicates the groupings of the variables, so for example this, [0 0 x(1) x(2)...

6일 ago | 1

Answered
initlalize several variables at once
Is there a way to more easily set this, assuming they all have the same initial guess? One way: params0=linspace(0.1,0.1,13) ...

6일 ago | 1

Answered
initlalize several variables at once
If all you're trying to do is polynomial surface fits of various orders, I would just use the Curve Fitting Toolbox, if you have...

6일 ago | 1

| accepted

Answered
Replace part of matrix with other matrix.
Z=zeros(2); B=B+cell2mat({Z,A,A1;A2,Z,A3;A,A1,Z})

6일 ago | 1

| accepted

Answered
General Approach to Fitting dozens of curves using the same coefficients
You can use lsqcurvefit to do so, simply by posing the problem as a 30-parameter fit. If you do this, you will want to provide a...

7일 ago | 1

| accepted

Answered
merge non-intersecting polygons
Use bwconvhull.

7일 ago | 0

| accepted

Answered
Placing values in a matrix with values from another matrix
A(A==1)=B;

7일 ago | 0

| accepted

Answered
Number of elements error
for i = 3:(length(x)-2) ff(i) = (-1*x(i+2)+6*x(i+1)-3*x(i)-2*x(i-1))/(6*dx); L = L + dx*((f(x(...

7일 ago | 0

| accepted

Answered
Removing sub matrix from 3d matrix, if any values in the matrix exceed a certain min/max value
discard=any( any( epochs_CG(1:2, :, :)>=100 ,2) ,1); epochs_CG(:,:,discard)=[];

7일 ago | 0

| accepted

Answered
How to replace 2x2 zero sub matrices by different 2x2 matrices ?
basically i want solution in this form x p1 p2 p3 p1 x p2 p3 p1 p2 x p3 p1 p2 p3 x C={zeros(2), p1,p2,p3}; result=B+ce...

7일 ago | 0

| accepted

Answered
How to replace 2x2 zero sub matrices by different 2x2 matrices ?
Here is a simple example, but the right hand side can be any array with an appropriate number of elements B(B==0)=1:48;

7일 ago | 0

Answered
Plotting subplot with two concurrent plots
figure; for k = 1:5 subplot(2,5,k); [val,loca]=(max(abs(squeeze(S(1,k,:,:))))); plot(T,squeeze(abs(S(1,k,92,:))),T,squeeze...

7일 ago | 0

| accepted

Answered
How to use blkdiag command to create a matrix such that its diagonal blocks are random 2 x 2 matrices?
Acell=mat2cell(rand(8,2), ones(1,4)*2,2) B=blkdiag(Acell{:})

7일 ago | 0

| accepted

Answered
Not quite fitting the data using lsqcurvefit
When your model function is fully vectorized, as suggested by Walter, the results are better, but only you can know for sure wha...

8일 ago | 0

| accepted

Answered
Defining array contents - order doesn't matter - Linear programming problem
It does not matter what order the B(i) are in, as long as the ordering of the rows A(i,;) matches B(i).

10일 ago | 0

Load more