Community Profile

photo

Matt J


Last seen: Today
6.358 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
changing a group of numbers in a vector
As an example, >> cycles=[0,1,0,1,0,1]; %3 cycles >> A=repelem(cycles,3) A = Columns 1 through 16 0 0 ...

ein Tag ago | 0

Answered
How to replace a vector element with a value not equal the other vector values?
function sudokuRow = fillSudokuRow(sudokuRow) idx=(sudokuRow==0); sudokuRow(idx)=func(sudokuRow(~idx)); end

ein Tag ago | 0

Answered
Passing parameter values found in lsqcurvefit to be initial values for parameter estimation in another function
Some possibilities, Combine the code from both fitting steps into a single script. That way you will have direct access to the ...

ein Tag ago | 0

Question


Is there a danger in renaming a Matlab install folder
I have Matlab R2019b installed under Windows 10 in the usual place, C:\Program Files\MATLAB\R2019b but I would now like to ren...

ein Tag ago | 2 answers | 1

2

answers

Answered
Speeding up nested for-loops when vectorization seems to fail
Getting rid of repmat (requires R2016b or later) and working with single float precision will get you some speed-up. In doubles...

3 Tage ago | 0

Answered
Speeding up nested for-loops when vectorization seems to fail
I tend to think you should be using scatteredInterpolant rather than implementing your own interpolation routine with loops.

3 Tage ago | 0

Answered
lsqcurvefit does not match data
Your model is clearly wrong, assuming that the given data is valid. In your current model, saturation is always 0 when displacem...

3 Tage ago | 0

| accepted

Answered
Row & Column Wise Normalisation
For a non-negative square matrix, the attached article mentions necessary and sufficient conditions (p. 3, Theorem 1) both for t...

4 Tage ago | 2

| accepted

Answered
How to move programmatically existing datatip
Maybe you can use the advice here, https://www.mathworks.com/matlabcentral/answers/100545-how-can-i-programmatically-control-mo...

4 Tage ago | 1

Answered
How to solve Too many input arguments error? Error in Fminsearch (line 200) fv(:,1) = funfcn(x,varargin{:});
This fh handles should be, fh{n}= @(x)vpe(x,p,MSM(:,n),erps(:,n),n);

4 Tage ago | 0

| accepted

Answered
A is a matrix of size 32*32.I want to subtract elements of each 4*4 block of A from their respective 4*4 means
out = blockproc(A,[4 4],@(x)mean(x.data(:))); result = A - repelem( out , 4,4);

4 Tage ago | 0

| accepted

Answered
Reducing repeated elements in an array by a factor
Another method, one which avoids for-loops inherent in cell2mat, V=[1,2,2,2,0,2,2,2,5,5,5,5,5,5,6,6,6]; N=3; X = cumsum...

5 Tage ago | 0

Answered
The support on here is horrible, does anyone have an api for the function calls? I'm tired of searching only to find examples of what I don't need.
Matlab Answers is a discussion forum, not a documentation browser. If you want to find documentation, start here, https://www.m...

6 Tage ago | 2

Answered
How to use fimplicit with a symbolic function
Using matlabFunction, you can derive a non-symbolic version of your circle equation expression from the symbolic version, >> ci...

6 Tage ago | 0

Answered
How can I get the elements from a matrix and use them as the coordinates in another matrix
D = C( sub2ind( size(C), W(:,1:end-1), W(:,2:end) ) ), sum(D,2)

7 Tage ago | 0

| accepted

Answered
A class to simulate missing arguments in function calls
The main drawback is that one must always use myfeval, which is not very readable. Yet another solution, which might address th...

7 Tage ago | 0

Answered
Multiple selection of an array
You can use sepblockfun downloadable from here https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-...

7 Tage ago | 0

Answered
A class to simulate missing arguments in function calls
Clearly, I would have to check for each input argument to be ~isempty(), or ~isnan(), which could be another technique. However,...

10 Tage ago | 0

| accepted

Answered
A class to simulate missing arguments in function calls
Seems to me that you can effectively accomplish what you want by defining a trivial class with no properties or methods, classd...

10 Tage ago | 0

Answered
Evaluating a complicated integral in Matlab gives NaN
Your integrand has a singularity at psi = pi/2. So perhaps try, f2(i) = integral(f1, 0, pi/2*(1-eps), 'ArrayValued', true);

10 Tage ago | 1

Answered
How to find "rectangular" corners?
Use pgonCorners from the File Exchange (Download). It applies to any convex polyhedron. numVertices=4; corners=pgonCorners(I...

11 Tage ago | 1

Answered
How can I change the 'MaxIterations' option in matlab 'createOptimProblem('fmincon',..........)'
You need to do this, opts=optimoptions('fmincon', 'MaxFunctionEvaluations',3000); problem = createOptimProblem('fmincon','x0...

11 Tage ago | 1

| accepted

Answered
Inconsistency in the definition of two geometric transformation matrices (tform)
The second form is the one expected by maketform. The only difference between the two conventions is that with the first, the tr...

11 Tage ago | 0

| accepted

Submitted


Find vertices in image of convex polygon
Estimates the corner points of a pixelated convex polygon having a known number of vertices.

11 Tage ago | 6 downloads |

Thumbnail

Answered
How can I find the coordinates of the top and bottom end plate and calculate the height?
The FEX submission pgonCorners (Download) can be used to find approximate corners for each of the vertebrae. Once you have the c...

12 Tage ago | 0

| accepted

Answered
How to get the maximum value of an implicit function?
I believe this method does not allow me to change the number of points in X, It does, e.g., f = fimplicit(fun,[0,40,0,9],'Mesh...

12 Tage ago | 0

Answered
How to avoid looping of anonymous function?
You could make it the end-user's responsibility to enter the function in anonymous form, >> f=input('Enter anonymous function: ...

12 Tage ago | 0

Answered
Fit image datapoints to curve
You would use a 2D version of an Iterative Closest Point (ICP) algorithm. This FEX contribution appears to have one: https://ww...

14 Tage ago | 0

Answered
Write a script that calculates the ​​user produced polynomial. The polynomial can be input until the user decides to terminate the program.
If you have the Symbolic Math Toolbox and wish to manipulate the polynomials in symbolic form, you can use poly2sym, >> p = inp...

19 Tage ago | 1

| accepted

Answered
sparse and gpuArray/sparse errors very odd! (with MWE)
Ultimately, the reason is that you are creating matrices that violate various internal array size restrictions. There are differ...

19 Tage ago | 1

Load more