Community Profile

photo

Matt J


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

5 hours 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(...

5 hours 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]); ...

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

6 hours 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 =[];...

8 hours ago | 0

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

1 day ago | 0

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

1 day 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 ...

1 day 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...

1 day ago | 1

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

1 day 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...

2 days 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...

2 days ago | 0

| accepted

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

3 days 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...

3 days 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...

3 days 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,:...

3 days 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 ...

4 days ago | 0

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

4 days 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...

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

6 days ago | 0

| accepted

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

6 days ago | 1

| accepted

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

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

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

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

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

7 days 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?

7 days ago | 0

Answered
Optimize model parameters given minimum sum of error square
It does not make sense that there are randomization operations like normrnd in your objective function. How can a function be "m...

7 days ago | 0

Question


Save and load alternative sets of preferences
I know how to set Preferences in Matlab through GUI buttons, however, suppose I have different sets of preferences that I wou...

8 days ago | 1 answer | 0

1

answer

Answered
fsolve with one variabel
I don't understand why you would be using Symbolic Math Toolbox variables, syms x unless you were planning to use solve, Tinc...

9 days ago | 1

| accepted

Load more