Community Profile

# Matt J

##### Last seen: 1 jour ago
7 028 total contributions since 2009

Professional Interests: medical image processing, optimization algorithms

View details...

Contributions in
View by

Because of the discontinuity at x1=0 and x2=0, you need to optimize over each quadrant separately. s=[+1,+1; %quadrant signs ...

environ 13 heures ago | 0

Mean Variance portfolio selection with l1-norm
Sure. Minimizing a quadratic subject to linear constraints is exactly what quadprog is for.

environ 18 heures ago | 0

How to perform image registration on GPU
If you only need to register translation, you can use normxcorr2() which is GPU-supported https://www.mathworks.com/help/images...

environ 19 heures ago | 0

how to find coordinates of each brick corners using matlab
After applying imopen() like ImageAnalyst recommends, you could download pgonCorners and apply it as in this example in this exa...

environ 19 heures ago | 0

What is wrong with my for loop?
It seems clear that when i=j, the left hand side of K((j*s-j-1):(i*s-i-1), (j*s-j-1):(i*s-i-1)) = k(1:s,1:s); will be 1x1 wher...

1 jour ago | 1

Drawing 4-sided polygons around objects
This will help to find the corners of the boxes. https://www.mathworks.com/matlabcentral/fileexchange/74181-find-vertices-in-im...

1 jour ago | 0

Stop chatting, MATLAB!
Just a guess, but you might try going into Preferences>>General and unchecking the option to send telemetry info back to MathWor...

3 jours ago | 0

How can we refer world coordinate to image coordinates??
You have world2Intrinsic() https://www.mathworks.com/help/images/ref/imref2d.worldtointrinsic.html

5 jours ago | 0

| accepted

Cone constraints with mixed integer programming
My approach would be to reduce this to a 1-variable minimization over x(11) and solve that with fminsearch, [Combinations{1:10}...

7 jours ago | 1

Find nonzero elements in 5x5 matrix (diagonal, vertical, horizontal line)
For example, to search for a column string, A =[ 1 4 4 4 5 3 1 4 1 4 5 ...

7 jours ago | 0

| accepted

How can I fit multiple lines through a common y-intercept?
p=[x(:).^[1,0] ,0*x(:); 0*x(:),x(:).^[0,1]] \[y1(:);y2(:)]; m1=p(1) b=p(2) m2=p(3)

7 jours ago | 2

| accepted

fmincon very slow for a small scale problem
Don't use Symbolic Toolbox operations. Remove all the sym operations and just convert fnsum to a numerical objective function.

7 jours ago | 0

| accepted

Double summation of a matrix
The expression in your .jpg file, if it needs to be evaulated for all p,q would be SML=conv2(ML,ones(N+1),'same')

8 jours ago | 0

Prevent a figure/axis from being made current manually
Like Walter mentioned, setting the figures HandleVisibility to off seems to do the job.

8 jours ago | 1

| accepted

Double summation of a matrix
In recent Matlab, you can do sum(matrix,'all') or more generally you can do sum(matrix(:))

8 jours ago | 0

Why Matlab tells the following A*A^T matrix is not a positive Semi-definite Matrix ?
Yes, it is positive semi-definite. But Matlab's ability to detect that is limited, because finite precision prevents it from com...

8 jours ago | 0

| accepted

Question

Prevent a figure/axis from being made current manually
Is there a way to disable the ability of the figure window to automatically become the current figure when a manual user action ...

8 jours ago | 2 answers | 0

### 2

Why matlab live editor and matlab script gives different rank calculation result for the same matrix ?
Probably because you copy-pasted the values of M from the screen to one of the scripts.

9 jours ago | 0

| accepted

How to rotate 3D cube so that one face is normal to a given axis
If I can choose the missing rotation angle freely, then here is one solution. % Centre of system coords_source_xyz= [-0.5,...

9 jours ago | 0

| accepted

Fitting Data from a matrix to polynomial
A very relevant example: https://www.mathworks.com/help/curvefit/fit.html#bto_zh5-3

9 jours ago | 0

How to solve a nonlinear equation?
[x,fval] = fzero( @(x) x^(8.5)+3*x.^2-3000,nthroot(3000,8.5))

9 jours ago | 0

fsolve function give poor results for multiple equations
Your equations are linear, so there is no reason to be using fsolve. I was able to obtain the coefficient matrix A for your line...

9 jours ago | 0

| accepted

Why do I only have an output of zeros for the 1 X 800
We cannot run your code, but a good debugging strategy would be to pause execution at this line, Kr_eff = ((1./mso).*sum(S.*(Ks...

9 jours ago | 1

Nonlinear inequality in GA optimization with integer constraints
In the code you have shown for POWER_CONSTRAINT(~), it does not make sense that POWER does not depend on the input, but rather o...

9 jours ago | 0

I know how to divide my 256x256 image into 16x16 blocks using mat2cell. Now I want to access those 16x16 blocks successively to further divide them into 4x4 blocks.
Using mat2tiles https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equal-sized-sub-arrays ...

10 jours ago | 1

Generate a 100000x100000 matrix that takes less time and memory
Seems to me the whole code can be replaced by, function [a,ed] = Random_graph_genar_function(nodes, connectivity) a=logi...

10 jours ago | 0

| accepted

Randomized Groups of Array
Ex. I have 250 numbers and I want them in 50 groups of 5 reshape( randperm(250) , 5,50) or 25 groups of 10, reshape( randpe...

10 jours ago | 0

How to solve explicit equation of ellipse
If you convert the ellipse to its polar representation https://en.wikipedia.org/wiki/Ellipse#Polar_form_relative_to_center tha...

10 jours ago | 1

How to find the solutions to a set of linear equations?
You can easily trap the point where NaNs are introduced using >>dbstop if naninf https://www.mathworks.com/help/matlab/ref/dbs...

11 jours ago | 0