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 2022
  • Grand Master
  • Editor's Pick
  • Personal Best Downloads Level 4
  • Most Accepted 2021
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Revival Level 4
  • 36 Month Streak
  • Thankful Level 5
  • Knowledgeable Level 5

View badges

Content Feed

Answered
How to find the closest values (positive and negative) to the line when X is zero?
load Data %Create line plot [x,is] = sort(V); y = J(is); in=find(x<0,1,'last'); ip=find(x>0,1,'first'); [xn,yn, ...

2 hours ago | 0

| accepted

Answered
Objective function for fmincon from surrogate model
Can't you just do, fun=@(X) norm(mdl.predict(X)-y).^2

4 hours ago | 0

Answered
Is it possible to add more constraints than the default ones in LSQLIN function?
You can still use lsqlin, but as John said, you can add additional inequality constraints as follows, Q=-sign(d).*C; r=zeros(s...

10 hours ago | 0

Answered
Optimising Limits of Chain integrals
There is virtually no benefit to the problem based approach if you are going to use fminunc. The main advantage of problem-base...

10 hours ago | 0

Answered
Cross-correlation of two complex signals using sliding dot product
If there is to be no zero-padding, what should happen when the shorter signal slides to the edge of the longer signal? Does the ...

21 hours ago | 0

| accepted

Answered
Finding Roots between a Differential and Piecewise Equation
a=1; [t_root,fval]=fzero(@(t)rootFcn(t,a), pi) function out=rootFcn(t,a) xp1 =@(t) ((-(8*2)/(2^2+1))*cos(t))+((8/(2^2+...

23 hours ago | 0

| accepted

Answered
Effect of zero padding on FFT amplitude
Here is an example showing that the amplitude of an FFT does not change due to zero-padding. In all cases, the peak amplitude is...

23 hours ago | 1

Answered
Projection using Modified Gram-Schmidt orthogonality
Aorth=orth(A); %A orthogonalized ProjB=Aorth*(Aorth.'*B); %projection of B

24 hours ago | 0

| accepted

Answered
How to use conditional bounds for parameters with lsqcurvefit?
You must divide the problem into two cases: one case where X0 is fixed at 0 and the second when Y0 is fixed at zero. xdata = 0:...

1 day ago | 3

| accepted

Answered
When using JacobianMultiplyFcn in lsqnonlin, why is Jinfo required to be numeric? How can I pass more general kinds of parameters to my JacobianMultiplyFcn?
I seem to be have been able to fool lsqnonlin into doing what I want by using the attached classdef. Still, I wonder why the Opt...

1 day ago | 0

Submitted


Tools for Processing Consecutive Repetitions in Vectors
A set of functions for labeling and manipulating groups of consecutively repeating elements in a vector.

1 day ago | 3 downloads |

Answered
How to group same value data
G=findgroups(A(:)); splitapply(@(x){x}, B(:),G)

1 day ago | 0

Answered
Latex typesetting in Livescript
I have expressed a desire to have \label{} and \ref{} in LiveScript, https://www.mathworks.com/matlabcentral/answers/1723075-au...

2 days ago | 0

Answered
calculate the euclidean distance among all the pairs of nodes and use those resulting distances as the edges weights of the graph
This is already done in spatialgraph2d() https://www.mathworks.com/matlabcentral/fileexchange/73630-spatialgraph2d which I thi...

2 days ago | 0

| accepted

Answered
Cut off a Curve created by "curve fit"
This might be what you want: for i = 1:12 x1 = [emax(i); emid(i); 0]; y1 = [vmax(i); vmid(i); dvc(i)]; p = pol...

2 days ago | 0

Question


When using JacobianMultiplyFcn in lsqnonlin, why is Jinfo required to be numeric? How can I pass more general kinds of parameters to my JacobianMultiplyFcn?
What I would like to do is use the JacobianMultiplyFcn option of lsqnonlin's trust-region-reflective algorithm where Jinfo is a...

2 days ago | 1 answer | 0

1

answer

Answered
limiting broadcast variables in parfor loops
The block decomposition that you are doing needs more explanation. If the blocks are just fixed-sized, non-overlapping tiles of ...

3 days ago | 0

Answered
how to run a function on GPU cores
so it would be great if we could have a function like "parfor" for GPU-based parallel processing. No, you cannot use GPU cores ...

3 days ago | 0

| accepted

Answered
MATLAB Problem. How to design matrix from eigenvalues
mindist=@(A) min(sqrt(pdist(real(A(:))).^2+pdist(imag(A(:))).^2)); n=5; Q=rand(n); Q(1)=0; Q=(1-eye(n)).*Q*0.5/mindist(...

3 days ago | 0

| accepted

Answered
MATLAB Problem. How to design matrix from eigenvalues
mindist=@(A) min(sqrt(pdist(real(A(:))).^2+pdist(imag(A(:))).^2)); n=5; P=rand(n); D=diag(rand(1,n)); A=P*D/P; A=A/mi...

3 days ago | 1

Answered
extract data points where the slope (derivative) of the plot changes suddenly
data=[ 1 2 3 4 3 2 1] loc=abs(diff(data,2)) > 1 loc=[false, loc ,false]; %pad with zeros because diff() shortens the vect...

3 days ago | 0

Answered
Extracting data points (with specific coordinates) from plot
For example, Y=40+0.04*linspace(-1,1,10) data=10*(1:numel(Y)) data_Extracted = data(abs(Y-40)<=0.01)

3 days ago | 0

Answered
Make loop more efficient
Simpler: A=rand(5), I=(A<0.5); A(I)=A(I)+1,

3 days ago | 0

| accepted

Answered
I am trying to replace the objective function of neural network to customised one
This talks about supplying a custom model function for NN training: https://www.mathworks.com/help/deeplearning/ug/train-networ...

3 days ago | 0

Answered
Use of fmincon with objective function as m-file
One way is to wrap the functions in an anonymous function: fun=@(X) objective_fn(V_exp, volt(O_plus,O_minus,X,L_a,L_c,I_app,t)...

3 days ago | 1

Answered
Fminsearch results shows shift from measured curve. How should I solve this?
The x_Start=[1,1] selection looks very arbitrary. If one of the parameters is the oscillation amplitude, it should be closer to ...

3 days ago | 0

Answered
Dividing each row in a 48X5120 int32 with the maximum value in the row
A=double(A); result = A./max(A,[],2)

3 days ago | 0

| accepted

Answered
Custom Matrix Interpolation for every 10 numbers in each column
A=reshape(1:40,[],2); A(10:end,:)=A(10:end,:)*2; A=A(1:5:end,:); %hypothetical input M=5; %upsampling factor A=kron(A...

4 days ago | 0

| accepted

Answered
latex in text doesn't work
gca; s=sprintf('$\\tilde{y}_x$ = %.3f',5) text(0.5, 0.5,s, ... 'Interpreter', 'LaTeX','fontsize', 30);

4 days ago | 0

Answered
Scaling in optimization problems
the derivate with dV/dc will get ever smaller with t. It's not clear that that matters because the values of c are also influe...

4 days ago | 0

| accepted

Load more