Community Profile

photo

Matt J


Last seen: Today
7.146 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
Convert Column vector into matrix
H=histcounts(coln,1:257); result=((1:10).'<=H).*(1:256);

circa 9 ore ago | 1

| accepted

Answered
lsqcurvefit bad fitting results
Probably the sqrt() operation in your model function. There is nothing preventing the algorithm from searching in regions where ...

1 giorno ago | 0

Answered
Is it possible to add variables to my nonlinear constraints if they are not in the objective function?
Your initial guess x0=[20,20] contains only 2 elements but it should contain 5 because that is how many unknowns you have. If yo...

1 giorno ago | 0

| accepted

Answered
Running function on GPU for all combination of variables
Here's a loop-free method using ndgridVecs, https://www.mathworks.com/matlabcentral/fileexchange/74956-ndgridvecs but bear in ...

2 giorni ago | 0

Answered
construction of diagonal matrix of functions
This might be what you want. It assumes that f_1,2,3(x) work element-wise. function A=func(x) f1=f_1(x(1:end-1)); f2=f_2(...

2 giorni ago | 0

| accepted

Answered
construction of diagonal matrix of functions
function A=func(x,n) e=zeros(1,n-2); f1=f_1(x); f2=f_2(x); f3=f_3(x); A=toeplitz([f2,f1,e], [f2,f3,e]); ...

2 giorni ago | 0

Answered
Running function on GPU for all combination of variables
In this case, I'd use parfor to descrease the simulation duration, but the size of this variable is quite large so I'd prefer to...

2 giorni ago | 0

Answered
Optimization of a unknown vector variable
H1=sum(h1); H2=sum(h2); H3=sum(h3); obj=@(a,b) H1.*a.^2 +H2.*b.^2+H3; x0=[1,1]; lb = []; ub = []; Aeq = []; beq =[];...

2 giorni ago | 0

| accepted

Answered
Is it possible to find out an unknown variable within constraint which is not present in the objective for a optimization problem?
Yes. It is not a problem if your objective only depends on a subset of variables. However, you must pass the full unknown vector...

3 giorni ago | 1

| accepted

Answered
FSOLVE GIVES SAME VALUE
clc;clearvars;close all; format short g;format compact; tfinal=30; pars.D=0.00005611; pars.x2f=20; pars.Y=0.4; pars.beta=0....

3 giorni ago | 0

Answered
Linprog stopped because no point satisfies the constraints.
linprog is telling you that no solution exists, because there is no x that satisfies your constraints. Your problem must have a ...

3 giorni ago | 0

Answered
How can I straighten edges of calibrated images ?
Try setting the 'OutputView' option to 'valid' https://www.mathworks.com/help/vision/ref/undistortfisheyeimage.html#d122e205695...

4 giorni ago | 1

| accepted

Answered
Matlab close when run
You are using an undefined variable called "k" inside myfun at this line vtk=vt/k; %<--- k not defined here

4 giorni ago | 0

Answered
lsqnonlin seems stuck at the same residual value,norm step and first order optimality for a while now
For a 3-variable problem known to have non-differentiabilities, it would make sense to use fminsearch instead of lsqnonlin. Ther...

4 giorni ago | 0

Answered
Optimization function based on different domain of optimized variables
Solve the problem twice, once with the constraint x1<=k and once with x1>=k, imposing the appropriate objective function in each...

4 giorni ago | 0

| accepted

Answered
Change white pixels to invisible
Shouldn't you have alphachannel = 1-double(all(image == 255, 3));

5 giorni ago | 0

Answered
Converting strings to operators
I can't tell if you really intend S to be a string vector because that dpesn't agree with the example you posted. If I assume it...

5 giorni ago | 1

Answered
optimization problem of areas
Your objective function Area2 is written to be a function of z, but nothing in sum( ( x.*dt(m(1):c(1)) ) ) depnds on z. Perha...

5 giorni ago | 0

| accepted

Answered
Fmincon gives relative maximum constraint violation but still gives output due to conflicting constraints.
For example, [tmp,fval,exitflag] = fmincon(Total_Profit,Guess,A,b,Aeq,beq,LB,UB,[],options); if exitflag>0 xopt(i,:...

5 giorni ago | 0

Answered
Calculate the midpoint of two lines on a track
The effectiveness of any solution we give will depend on whether the illumination levels of every frame will be similar to your ...

6 giorni ago | 0

Answered
Preallocation within an optimization loop
xopt=nan(runs,2); %Pre-allocate Total_Private_Profit=nan(runs,2); %Pre-allocate for i = ...

6 giorni ago | 0

| accepted

Answered
orthagonal planes and normal vectors
format long; A=normalize( [3,2,-1; 3,-8,-7;-22,18,-30] ,2,'norm'); If they are orthogonal, this should give the identity matr...

8 giorni ago | 1

Answered
Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.699518e-25.
If C is singular, then C is singular and that's all there is to it. However, this will make the same inversion slightly less sin...

8 giorni ago | 0

| accepted

Answered
How to plot the trajectory that fminsearch follows?
trajectory=doIt(); fcontour(@rosenbrock, [0 3 -3 3],'LineColor', '#00FFFF', 'MeshDensity',50,... ...

8 giorni ago | 1

| accepted

Answered
Sparse vs Least square solution differ at the edges
Because you forgot to transpose c, s2 = mldivide(full(c.'),b.').';

8 giorni ago | 0

| accepted

Answered
Drawing upon general, user-created mfiles and .mat files for the Answers forum RUN feature
Here is a test of the technique using an attached mfunction. websave('testfunction', 'https://www.mathworks.com/matlabcentral/a...

9 giorni ago | 0

Question


Drawing upon general, user-created mfiles and .mat files for the Answers forum RUN feature
Thanks to brilliant advice from Ameer Hamza, I have found a way to draw upon URL-posted .mat files as input to the Matlab Answer...

9 giorni ago | 1 answer | 0

1

answer

Answered
Help me how to find the base of the intersection of two subspaces
If the vectors form the columns of a matrix A and the vectors form the columns of a matrix B, then the basis of the intersecti...

9 giorni ago | 1

| accepted

Answered
Using blockproc to simply copy an array
Using sepblockfun from the file exchange, https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-opera...

9 giorni ago | 0

Answered
Random number generator with max and min values included in the matrix
I believe your code already works as written. Problem solved?

9 giorni ago | 0

Load more