Community Profile

photo

Matt J


5 952 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

  • Master
  • Revival Level 4
  • 36 Month Streak
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer

View details...

Contributions in
View by

Answered
Is my code correct for finding the distance between a point and a surface?
It's largely correct, except that your function distsq is not differentiable at x=0. So, if there's a chance the solution might ...

ungefär 24 timmar ago | 1

| accepted

Answered
Setting a Value in an Array in a Class
Use an ordinary method: classdef myclass_t properties my_array double end methods functi...

en dag ago | 1

Answered
How to solve linear equation for 3 unkowns using SOR in GPU
If you have the Parallel Computing Toolbox, you can make all the variables in your SORstep function A,B,C,D,E,F,G,H,I,J,K,L,om...

en dag ago | 0

Answered
in a loop like go back
first=find(a<=1, 1); a(1:first)

en dag ago | 0

Answered
Index in position 2 exceeds array bounds?
No, it is because of this line, ymax = max(n,j+1); %should be min But I agree with Rik that medfilt2 makes much more sense her...

en dag ago | 1

Answered
Over-all sum value in fmincon for multiple x
Are you sure you only have 6 unknowns? In your earlier post, you had more. https://www.mathworks.com/matlabcentral/answers/4802...

en dag ago | 0

| accepted

Answered
How to fix the error (Index exceeds matrix dimensions)?
V and W only have a single column, but you are indexing them V(:,j) and W(:,j) at j>1.

en dag ago | 0

| accepted

Answered
round off problem in matlab
The values are not changed. They are just displayed to the screen to 4 decimal points. Use format long to see more precision. Al...

en dag ago | 0

Answered
Accessing structure by its name and looping through it
Why not organize the data as a struct array? Tests(1).Time = data1; Tests(1).Speed = data2; Tests(2).Time = data3; Tests(2...

en dag ago | 1

| accepted

Answered
How to solve linear equation for 3 unkowns using SOR in GPU
Not sure why you would be using an iterative method when an analytical solution is available. A=gpuArray.rand(3,3,512^2); b=gp...

2 dagar ago | 0

Answered
How to match an image subset in an image?
This might be applicable, https://www.mathworks.com/matlabcentral/fileexchange/33340-wncc-weighted-normalized-cross-correlation...

2 dagar ago | 1

Answered
Find minimum of an n variable function, n is like 800+
Depends on the surface. It's trivial, for example, if the surface is a hyperplane or a hypersphere.

2 dagar ago | 1

Answered
manipulation of (too) huge matrix (beyond the calculation capacity of my computer)
Actually, I am only interested in combinaison for which the addition of MllA+MllB are between 427.92105 and 428.49755 If you ha...

2 dagar ago | 0

| accepted

Answered
Error in fitting two parameters with lsqnonlin
[curve_fit_parameters,RESNORM,RESIDUAL,EXITFLAG,OUTPUT,LAMBDA,JACOBIAN] = ... lsqnonlin(@(k) fitcrit(k,time_exp, conc_exp, pa...

2 dagar ago | 0

| accepted

Answered
Mathworks Questions Resolved.
You should see a button next to the Answer allowing you to accept it. You can also Upvote the answer to award the answerer extra...

2 dagar ago | 0

| accepted

Answered
Finish lines in the image
Here is another method based on interpolation, and faster than dilating with large strels. [m,n]=size(A); [I,J]=find(bwskel(...

2 dagar ago | 1

Answered
Calling vectors from a user defined function?
You are missing a multiplication operator after the 2 in line 15.

3 dagar ago | 1

Answered
Steepest descent method algorithm
alpha is too big. Try alpha=0.001.

3 dagar ago | 1

| accepted

Answered
Image processing and sub-array summation
You can use sepblockfun from the File Exchange https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-...

3 dagar ago | 1

Answered
Finish lines in the image
Perhaps as follows, gapsize=36; A=imcrop(rgb2gray(imread('image.png'))); B=(imdilate(A,strel('sphere',ceil(gapsize...

3 dagar ago | 2

Answered
Optimization expression operation not supported
Maybe this is what you intended, C=cashFlows*bonds-obligations; E=C.'*triu(ones(8)); ALM.Constraints.Const1 = (E.*(1+Rates)')...

3 dagar ago | 0

| accepted

Answered
How to deblur an image after gauss filter and image registration?
Use imregtform to perform the registration on the blurred images and to obtain the optimal tform. Then apply the tform to your o...

4 dagar ago | 0

Answered
How to find the (x,y) combinations that make z=0?
You can use fimplicit https://www.mathworks.com/help/matlab/ref/fimplicit.html

4 dagar ago | 0

Answered
Plotting a for loop
C=nan(1,101); F=C; %preallocate for i = 0:100; C(i+1) = i; F(i+1) = (i*1.8)+32; end plot (C,F) xlabel(...

4 dagar ago | 0

Answered
fsolve with functions inside script
A=3; B=2; x0=1; fsolve(@(x)fun(A,B,x) ,x0); function F=fun(A,B,x) A=A; B=B; F=A+B/x end

4 dagar ago | 0

Answered
Find the cell index in a nested cell array, corresponding to a string (by using strcmp)
B=cellfun(@(x) strcmp(x, 'BLUE'), A, 'UniformOutput', false); cellfun(@(c) any(c(:)), B)

4 dagar ago | 1

| accepted

Answered
Remove rows in variable dimension
idx=repmat({':'},1,ndims(M)); idx{dim}=1:size(M,dim)-N; M2=M(idx{:})

4 dagar ago | 0

| accepted

Answered
How to set up the following optimisaiton witth quadprog?
You haven't shown any constraints. Are you sure you couldn't just use lscov? If you do have constraints, I think lsqlin would b...

4 dagar ago | 0

| accepted

Answered
Error using horzcat Dimensions of matrices being concatenated are not consistent.
I suspect it is because y is a column vector, whereas you intended it to be a row vector. You should run the code with "Pause on...

4 dagar ago | 0

Answered
object detection in a binary image
>> bwimage=imbinarize(rgb2gray(imread('bwimage.jpg'))); >> locations=regionprops('table',~bwimage,'Centroid') locations = ...

7 dagar ago | 0

| accepted

Load more