Community Profile

photo

Matt J


Last seen: Today
6,328 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

  • Personal Best Downloads Level 4
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Master
  • Revival Level 4
  • 36 Month Streak
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer

View details...

Contributions in
View by

Answered
"Index exceeds the number of array elements"
Perhaps this is what you are looking for, function [Ex, Ey, Ez] = E_field(x,y,z) R_s = 0.02; V = 0; epnaut = 8...

7 hours ago | 0

Answered
how to do violin plot in matlab
Here's my personal favorite. https://github.com/bastibe/Violinplot-Matlab

7 hours ago | 0

Answered
Unable to convert expression into double array
One way is to convert the symbolic expression to a function with matlabFunction. Then you can pass values to it as for any funct...

1 day ago | 0

| accepted

Answered
Finding the matrix I generated two iterations back, while loop
One option is to maintain a list of the last two D's in a cell array: C = [0 0 0; 1 1 1;0 0 0]; B = [zeros(1, N); C; zeros(...

1 day ago | 0

| accepted

Answered
Newton's Method in Matlab
Did you check whether the while loop is ever executed, even once? I don't think it is.

1 day ago | 1

Answered
Constraining Function in fmincon
Now that the problem is clearer, it appears to me that you could have done the whole thing with linprog, f=[2,1]*t; Aineq = -...

1 day ago | 0

Answered
Upsampled image FFT contains NaNs.
You have a division by zero in this line, res = y./scale; That leads to NaNs in cp_vol and hence also in shift_vol.

1 day ago | 0

| accepted

Answered
Better parallelization than parfor?
The reason why I think it could be improved is that MATLAB tells me that vec in my above example is a 'broadcast' variable and m...

1 day ago | 0

Answered
Nonlinear Least Squares implementation
[x,resnorm,res,eflag,output1] = lsqnonlin(@(x) myLS(F, S0, r, w, t, Q0, x) ,x0) See also Passing Extra Parameters.

1 day ago | 1

| accepted

Answered
Returning an Entire Row Based on the Max in a Column
[~,imax]=max(x(:,2)); out = x(imax,:)

1 day ago | 0

| accepted

Answered
Constraining Function in fmincon
It sounds like you need to apply a nonlinear constraint. If so, you need to use fmincon with 9 or more input arguments specified...

1 day ago | 0

| accepted

Answered
how to create a symmetric Toeplitz matrix with bounds on eigenvalues?
R=fft(eye(400))/sqrt(400); e=zeros(1,400); e(2)=-10; e(end-1)=+10; e=ifftshift(e); T=(R'*diag(e)*R); T=real((T+T.')/2);...

4 days ago | 1

| accepted

Answered
optimization problem wont find any solutions
The problem is infeasible, or your initial guess x0 is too far from a feasible point.

5 days ago | 0

| accepted

Answered
making coarse matrix from fine resolution matrix
A 3rd approach, more memory conserving and faster,. Z1=randi(100,8640,4320); u = 5; %upsampling factor d = 12; %...

5 days ago | 1

| accepted

Answered
3D image template matching by using (normalized) cross correlation?
I've never used it myself , but you could try this FEX submission, https://www.mathworks.com/matlabcentral/fileexchange/73946-n...

6 days ago | 0

| accepted

Answered
making coarse matrix from fine resolution matrix
If you have the Image Processing Toolbox, abc1=imresize(Z1,[3600,1800])

6 days ago | 1

Answered
find the element in matrix of intersecting vectors
attainedA=( max(a,[],1)==a ); attainedB=( max(b,[],2)==b ); result = c(attainedA & attainedB)

6 days ago | 1

| accepted

Answered
Quadprog message: The problem is non-convex
You cannot submit a problem that is borderline convex to quadprog if it is using an algorithm that expects convexity. If you do,...

6 days ago | 0

Answered
How to define a plane by matrices instead of a function?
For example, A = [104,122,111]; B = [253,122,153]; C = [104,124,111]; normal=normalize( cross(A-B,A-C),'norm'); %calcul...

7 days ago | 1

| accepted

Answered
When using the cftool, should I use Trust Region or Levenberg-Marquardt?
You can read here about the relative limitations of the 2 algorithms, https://www.mathworks.com/help/optim/ug/lsqcurvefit.html#...

7 days ago | 0

| accepted

Answered
Need Math to Rotate XYZ Point Around A-B Rotary Axes
See Rodrigues' formula, https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula Also, though you are apparently not worki...

7 days ago | 0

Answered
How to run fmincon using following function?
With no constraints, it would simply be, x=ones(200)/(-c*B);

7 days ago | 0

| accepted

Answered
No solution found when solving 3 non linear equations
A numerical sweep also gives evidence that there is no solution [x1,x2,x3]=ndgrid(linspace(-pi,+pi,512)); F1=cos(-x1+x2)+c...

8 days ago | 0

Answered
How do you call an inline or anonymous function within cellfun?
I reverted back to the for loop This might be faster than the for-loop, allB=[B{:}]; idx=ismember(allB,A); Blens=cellfun('l...

8 days ago | 1

Answered
How do you call an inline or anonymous function within cellfun?
But would still like to know how to use anonymous functions within cellfun There's no difference. Since findVal is already a fu...

8 days ago | 0

| accepted

Answered
Converged to an infeasible point.
The initial guess you have chosen x0 = [1,1,1,1,1,1,1,1]; seems very arbitrary. You should devise an initial guess more likely...

9 days ago | 0

| accepted

Answered
Matrix sequence manipulation for multiple value assignment
e=1:numel(A); lidx= any(idxes(:,1)<=e & e<=idxes(:,2),1); A(lidx)=1;

9 days ago | 0

Answered
Matrix sequence manipulation for multiple value assignment
If the intervals will always be disjoint, A=zeros(20,1); n=numel(A); A(idxes(:,1))=1; A(idxes(:,2)+1)=-1; A=cumsum(A(1:n)...

9 days ago | 0

Answered
Getting the coordinates of vertices of an A4 sheet with coins on it, for its further projective transformation and coin detection
The Computer Vision Toolbox has a few corner point detector apps, https://www.mathworks.com/help/vision/ug/point-feature-types....

9 days ago | 0

Load more