Community Profile

# Matt J

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

#### Matt J's Badges

View details...

Contributions in
View by

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

23 hours ago | 0

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

3 days ago | 0

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

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

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

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

6 days 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')

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

6 days 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(:))

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

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

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

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

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

8 days ago | 0

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

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

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

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

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

8 days ago | 1

| accepted

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

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

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

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

10 days ago | 0

Efficient number occurence count
In this situation, accumarray will be faster than histcounts, but still not as fast as the for-loop, tic; hc=accumarray(num(:)...

10 days ago | 1

| accepted

Registation of two images in '.mat' format
With monomodal registration, it works fine for me, [optimizer, metric] = imregconfig('monomodal'); but I should mention that t...

10 days ago | 0

| accepted

construct a two level optimisation problem has fmincon solver for lower level and genetic algorithm for upper level
You are passing a variable called xl to LLConstraint(), but xl is not used anywhere within that function. The function is theref...

10 days ago | 0

Efficient number occurence count
I want to efficiently count the number of occurences of numbers between 1-numel(num) in a Matrix If that's really what you want...

10 days ago | 0

Using fsolve with multiple unknowns
...but unsure on the syntax for a problem like this. The syntax does not change. It is simply that your equation expressions w...

10 days ago | 0

| accepted

Array value replace when change in row
A=randi([0,1],7,10); %Example [m,n]=size(A); [~,idx]=max(A,[],1); out = sparse(idx,1:n,1,m,n) ; A, full(out)

11 days ago | 0

| accepted