Community Profile

photo

Matt J


Last seen: Today Active 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.

Statistics

All
  • Most Accepted 2021
  • Editor's Pick
  • Personal Best Downloads Level 4
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Master
  • Revival Level 4
  • 36 Month Streak
  • Thankful Level 5
  • Knowledgeable Level 5
  • First Answer

View badges

Content Feed

Answered
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)

ungefär 20 timmar ago | 0

Answered
Attempt to execute SCRIPT varargin as a function:
Your function does not begin with the function declaration line.

ungefär 20 timmar ago | 0

Answered
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...

ungefär 20 timmar ago | 0

Answered
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.

en dag ago | 1

Answered
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)

4 dagar ago | 0

| accepted

Answered
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 '...

4 dagar ago | 0

| accepted

Answered
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.

4 dagar ago | 0

Answered
Specify initial condition for linprog?
You can try adding the inequality constraint f.'*x<=f.'*x0.

4 dagar ago | 0

Submitted


gaussfitn
Fit N-dimensional scattered points with Gaussian+constant

4 dagar ago | 12 downloads |

Thumbnail

Answered
Vectorize an anonymous function
This FEX submission already appears to do what you want, https://www.mathworks.com/matlabcentral/fileexchange/69116-gaussfitn?s...

4 dagar ago | 0

Answered
Vectorize an anonymous function
Just replace all the uniqPosOne(n,:) with uniqPosOne: gaussElpt = @(param) (param(1) + param(2).*(exp(-1/2 .* (uniqPosOne - [p...

4 dagar ago | 0

| accepted

Answered
Fast fourier transform on every single pixel of time series images
fftn(ImageSeries,[],3)

4 dagar ago | 0

Answered
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) -(...

4 dagar ago | 0

| accepted

Answered
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)

4 dagar ago | 0

| accepted

Answered
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...

4 dagar ago | 0

| accepted

Answered
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)

5 dagar ago | 0

Answered
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...

5 dagar ago | 0

Answered
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...

5 dagar ago | 0

Answered
Query regarding toolbar in MATLAB App designer
As far as I can tell, you must rebuild the toolbar using uitoolbar, uipushtool, and uitoggletool.

5 dagar ago | 0

Answered
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...

5 dagar ago | 1

Answered
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...

5 dagar ago | 0

| accepted

Answered
How to calculate the rotation of this egg?
BW1=~getEgg('egg1.png'); BW2=~getEgg('egg2.png'); S1=regionprops(BW1,'Orientation'); S2=regionprops(BW2,'Orientation'); ...

5 dagar ago | 1

Answered
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...

6 dagar ago | 1

Answered
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*...

6 dagar ago | 0

| accepted

Answered
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...

6 dagar ago | 0

Answered
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 ...

6 dagar 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...

6 dagar ago | 1 answer | 0

1

answer

Answered
fmincon 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...

6 dagar ago | 2

| accepted

Answered
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);

6 dagar ago | 0

| accepted

Answered
Number of .mat files into single .mat file
It depends what they contain and how you want the variables joined within the final .mat file. One way: filenames="data"+(1:10...

6 dagar ago | 1

| accepted

Load more