
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 262,960
REPUTATION
24,952
CONTRIBUTIONS
218 Questions
9,699 Answers
ANSWER ACCEPTANCE
75.23%
VOTES RECEIVED
3,272
RANK
242 of 17,997
REPUTATION
5,610
AVERAGE RATING
4.90
CONTRIBUTIONS
34 Files
DOWNLOADS
305
ALL TIME DOWNLOADS
46949
RANK
of 113,920
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
While loop has disagreeing matrix dimensions
while strcmpi(inputMaterial,'steel')
12 hours ago | 0
| accepted
HOW CAN I DEAL WITH NEGATIVE VALUS I AM RECEIVING AFTER PERFORMING DECOMPOSITION
Threshold them? x=[-2 -1 0 1 2 3] xpos=max(x,0)
4 days ago | 0
Attempt to execute SCRIPT varargin as a function:
Your function does not begin with the function declaration line.
4 days ago | 0
Extract fields from structure
S.C.XX_YY1=5; S.C.XX_YY2=10; S.C.ZZ=3; f=fieldnames(S.C); I=startsWith(f,'XX_YY'); f=string(f(I)); for fI=string(f...
4 days ago | 0
Create the program to return the orthogonal basis and orthonormal basis
You should just use orth to get the orthonormal basis. And you should use qr instead of Gram-Schmidt.
5 days ago | 1
Running multiple scripts on separate cores in parallel
fcn=@(i) run("test"+i); for K=1:n F(K)=parfeval(fcn,0,K); end; wait(F)
7 days ago | 0
| accepted
A compact way to remove empty rows in a cell array matrix ?
a = { '22-Jul-2021 17:00:00', 49 '', [] '', [] '', [] '', [] '27-Jul-2021 20:00:00', 123 '...
7 days ago | 0
| accepted
How define limits of upper and lower bound in Fmincon having different variables
SInce X0 is 4x3, your LB and UB will be 4x3 as well.
7 days ago | 0
| accepted
Specify initial condition for linprog?
You can try adding the inequality constraint f.'*x<=f.'*x0.
7 days ago | 0
Submitted
gaussfitn
Fit N-dimensional scattered points with Gaussian+constant
7 days ago | 14 downloads |

Vectorize an anonymous function
This FEX submission already appears to do what you want, https://www.mathworks.com/matlabcentral/fileexchange/69116-gaussfitn?s...
7 days ago | 0
Vectorize an anonymous function
Just replace all the uniqPosOne(n,:) with uniqPosOne: gaussElpt = @(param) (param(1) + param(2).*(exp(-1/2 .* (uniqPosOne - [p...
7 days ago | 0
| accepted
Fast fourier transform on every single pixel of time series images
fftn(ImageSeries,[],3)
7 days ago | 0
Error in using 'cumtrapz' for integration
But next, value of h1 at each grid point must match {-sin(grid point value) - (-sin(-1))}, No, it will be -sin(x)+x*cos(-1) -(...
7 days ago | 0
| accepted
sorting an array in a specific order
x=[1 2 2.5 3 4 5]; y= 3.4; [~,is]=sort(abs(x-y)) x=x(is)
7 days ago | 0
| accepted
Genetic Algorithm for points External To a Specific Volume
You would have to use a non-linear constraint function for that: function [cineq,ceq]=nonlcon(x) x=reshape(x,3,[]); %reshap...
7 days ago | 0
| accepted
How can I assign zeros to a particular value in an expression
N =8; u = [0,(1:N-1),0]; v=N:N-1+numel(u); rhsode=diff(u,2)+v(3:end)-v(1:end-2)
8 days ago | 0
Question about the fminsearch Algorithm
Is there a way for me to actually set up the starting simplex by myself? So that instead of giving the fminsearch-solver an init...
8 days ago | 0
Fitting a line of best fit on a plot only between a restricted domain.
You can do it interactively with the brush tool and basic fitting menu options on the figure toolbar. https://www.mathworks.com...
8 days ago | 0
Query regarding toolbar in MATLAB App designer
As far as I can tell, you must rebuild the toolbar using uitoolbar, uipushtool, and uitoggletool.
8 days ago | 0
Parallel processing in ga using 'UseParallel'
Is it that it calls the objective function in parallel? Yes. And can I specify in the parallel pool settings that only 10 are...
8 days ago | 1
Automatisation of struct creation and data import
for i=1:3 data_alone_paired(i,1).acc_pelvis_subject1 = data_alone(2*i-1).fsignal_down(:,1); data_alone_paired(i,1).acc_pelvi...
9 days ago | 0
| accepted
How to calculate the rotation of this egg?
BW1=~getEgg('egg1.png'); BW2=~getEgg('egg2.png'); S1=regionprops(BW1,'Orientation'); S2=regionprops(BW2,'Orientation'); ...
9 days ago | 1
How to calculate the rotation of this egg?
First, crop the black corders from your image fiels. Then, use ellipticalFit() from, https://www.mathworks.com/matlabcentral/fi...
9 days ago | 1
How can I calculate and plot a 3D pointing vector from a 2D azimuth and elevation angle?
x1=2; %initial x position y1=2; %initial y position z1=0; elev=20; [az,r]=cart2pol(x1,y1); [x2,y2,z2]=sph2cart(az,elev*...
9 days ago | 0
| accepted
Not enough input arguments
It must be something in your environment. Running the code here in the forum produces no errors. I would suggest clearing the wo...
9 days ago | 0
Deduplicate Rows from Struct
How about this? Database.x = [1 0 1 2 0 2 3 0 1 1 0 1]; Database.f = [10 20 ...
9 days ago | 0
| accepted
Question
Is there a way to specify objective and constraint gradients when doing nonlinear optimization in the problem-based framework?
In the solver-based framework, user-applied gradients are specified as additional output arguments from the objective and constr...
9 days ago | 1 answer | 0
1
answerfmincon nonlinear inequality constraint
The nonlinear constraints are not obeyed at all iterations. At iterations where they are not obeyed, chol() will give you an err...
9 days ago | 2
| accepted
Remove centroid locations of objects that are too close
A=[xf(:) yf(:)]; D=pdist2(A,A); D(D==0)=inf; %retroactive EDIT keep = all(D>d,1); xf=xf(keep); yf=yf(keep);
9 days ago | 0
| accepted