Community Profile

photo

Matt J


4,842 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
Grouping elements by conditions
You could try <https://www.mathworks.com/matlabcentral/fileexchange/33877-find-graph-conected-components this file> x=[ 1 ...

9 hours ago | 1

| accepted

Answered
I dont't know how can I solved this failure?( fmincon (line 536) initVals.f = feval(funfcn{3},X,varargin{:});)
[x,fval] = fmincon(@(x) multiobj(x,w1,w2) , x0, [], [], [], [], LB, UB, @Constraints);

9 hours ago | 0

Answered
How to close two figures by pressing the mouse button on the X just once?
You would probably have to use event listeners. The following is an example of how you could do this for 2 open figures. h(1...

4 days ago | 1

| accepted

Answered
How to get the intersection points between (each line and the circles that intersected with that line)??
Can't you just modify as follows, P{i,j} = InterX([x+C_M(index,1);y+C_M(index,2)],[r*[zeros(size(deg(j...

4 days ago | 1

| accepted

Answered
"OR" constraints lsqlin
You could try using ga() instead with the constraints max( ∑(inputs) -Demand -Outflow , -Outflow) = 0 This is equiva...

6 days ago | 0

Answered
2 dimensional array operation
Maybe you want Array2D = Current.*(Index==0);

8 days ago | 0

| accepted

Answered
Change in linprog.m output?
You should save to a cell array. [fitpars{k}, ~, flag(k)] = linprog(w,A,b,[],[],lb,ub,[],opts); It was just random luck t...

8 days ago | 0

| accepted

Answered
cumulative sum of an array
br=reshape(b,5,[]); S=reshape( cumsum(br-mean(br)) ,1,[])

8 days ago | 0

| accepted

Answered
How can i make my rounds() function be very precised when handling around 400 values at a time?
It happens because you are passing the vector expression |dist >= 0.25| to if...end, incorrectly thinking that the if...end will...

8 days ago | 1

| accepted

Answered
sum all successive values in matrix row
map=(B~=0); C=cumsum(map.*A,2,'reverse').*B+B

8 days ago | 1

| accepted

Answered
why my function give back only 1 answer instead of 2?
Your function _can_ return 2 arguments, but will not unless you request 2 outputs in the function call, e.g., [out1,out2]=h...

10 days ago | 0

| accepted

Answered
how to delete row and column at a single command????????????
a=A(1:2:end,1:2:end),

10 days ago | 1

Answered
I am trying to find the corners of the "rectangular" shapes. This code is working very well. But I dont know exactly how it works. Can you explain me ??
Maybe this image will help. The corners of a polyhedron will maximize/minimize the intercept of lines of a certain slope - it's ...

21 days ago | 0

| accepted

Answered
Multistart or global search for lsqnlin
problem = createOptimProblem('lsqnonlin','objective',@(x) myfun(x, y, X),... 'x0',x0,'lb',lb);...

21 days ago | 0

| accepted

Answered
How to integrate a shifted lognormal distributed random variable
For the edited version of your post, a=-1+mu; b=mu; sigma=sqrt(sigmasq); Sneg = logncdf(b,mu,sigma) - logncdf(a,...

27 days ago | 0

| accepted

Answered
Ellipse in parametric form ?
You cannot determine the ellipse with only the foci. You also need to know r1. Once you know that however, you can determine r...

27 days ago | 0

Answered
How to integrate a shifted lognormal distributed random variable
Maybe you can explain the ulterior motive of this. The s_om that you've defined has the form of a non-shifted lognormal pdf, but...

27 days ago | 0

Answered
how to use fminsearch and random function together?
Using rand() is not the way to choose an initial guess, especially when you have a complicated objective function like here. In ...

27 days ago | 1

| accepted

Answered
how to find the average of two consecutive value column wise for a matrix?
A = 1 2 3 2 8 6 1 4 1 B=interp2(A,1); B(2:2:end,2:2...

28 days ago | 0

| accepted

Answered
Fitting data in a non-linear function with constraints
*I need to find B(x2). However, there are not physical models to determine it, so here I just looked for mathematical functions ...

28 days ago | 1

| accepted

Answered
Fitting and imposing certain range in variables
No, it is not possible to apply that requirement directly through the fit() function. There are perhaps 3 possible approaches yo...

28 days ago | 1

| accepted

Answered
Non Linear Eigenvalue problem
wsol=fsolve(@fun4evp,0.1),

29 days ago | 0

Answered
How to fit quadratic function with plateau condition?
LSQCURVEFIT seems to do a decent job. There was no guarantee that it would work - it's not clear to me that the model function h...

30 days ago | 0

| accepted

Answered
How do I export a .png file including the legend by using a command?
Use the saveas() command or <https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig export_fig>.

30 days ago | 0

Question


Understanding nargout(@plot) and detecting "varargout-only" functions
I am trying to understand why nargout(@plot) returns 1. >> nargout(@plot) ans = 1 My ulterior motive is to...

1 month ago | 2 answers | 0

2

answers

Answered
How to stop loop without stopping the script?
Use the BREAK command exit the loop early.

1 month ago | 0

Answered
Matlab parfor saves and loads temporary variables during execution!
I don't know why authoritatively, but it seems to me that this is only a danger if you are unaware of this behavior on the part ...

1 month ago | 0

| accepted

Answered
How to have a matrix that organize samples according to distance ?
You can use the attached mfile to generate a 652x652 inter-column distance matrix. Then you can sort your data (somehow) based o...

1 month ago | 1

| accepted

Question


Why doesn't the methods() command display set.property() and get.property() methods of a class? What alternative can be used to find them?
Why doesn't the methods() command display set.property() and get.property() methods of a class? What alternative can be used to ...

1 month ago | 1 answer | 0

1

answer

Answered
how to solve this error in lsqnonlin of optim tool?: LSQNONLIN requires all values returned by user functions to be of data type double
You are doing various symbolic manipulations. Are you sure that z evaluate to a numbers? If so, just convert y=double( sum(...

1 month ago | 1

| accepted

Load more