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.

Answered

Using fminsearch I want to plot the model function whose parameters I'm fitting at each iteration without the figure window stealing focus. How do I do this?

Stop invoking whatever command it is (figure(), axes() ?) that you are using to bring the figure into focus. Calling the plot co...

Using fminsearch I want to plot the model function whose parameters I'm fitting at each iteration without the figure window stealing focus. How do I do this?

Stop invoking whatever command it is (figure(), axes() ?) that you are using to bring the figure into focus. Calling the plot co...

etwa 23 Stunden ago | 0

Answered

Updating for loop boundaries in MATLAB

for i = 1:size(A,1)

Updating for loop boundaries in MATLAB

for i = 1:size(A,1)

etwa 24 Stunden ago | 1

| accepted

Answered

Calculation of the gradient of a function in BFGS Quasi-Newton Algorithm

With respect to all the variables that are unknown.

Calculation of the gradient of a function in BFGS Quasi-Newton Algorithm

With respect to all the variables that are unknown.

etwa 24 Stunden ago | 0

| accepted

Answered

matrix dimensions must agree error

Possibly a missing comma here, K=1/h^2*(2.*diag(ones(1,N+1))-diag(ones(1,N)-1)-diag(ones(1,N),1)); ...

matrix dimensions must agree error

Possibly a missing comma here, K=1/h^2*(2.*diag(ones(1,N+1))-diag(ones(1,N)-1)-diag(ones(1,N),1)); ...

4 Tage ago | 0

| accepted

Answered

Define a variable without assigning a value

Perhaps you are trying to do symbolic computations, https://www.mathworks.com/help/symbolic/performing-symbolic-computations.ht...

Define a variable without assigning a value

Perhaps you are trying to do symbolic computations, https://www.mathworks.com/help/symbolic/performing-symbolic-computations.ht...

4 Tage ago | 0

Submitted

N-dimensional sparse arrays

Creates an N-dimensional sparse array object, for arbitrary N.

4 Tage ago | 48 downloads |

Answered

How can I use 'Least Squares Solver and Jacobian' instead of 'fminunc'?

Assuming D_d is the Jacobian of myfun, it would be, while (sum(abs(beta_u-beta_d))>0.1 && counter< 500) initial_gues...

How can I use 'Least Squares Solver and Jacobian' instead of 'fminunc'?

Assuming D_d is the Jacobian of myfun, it would be, while (sum(abs(beta_u-beta_d))>0.1 && counter< 500) initial_gues...

5 Tage ago | 0

Answered

How to view centers on a 3D image

One suggestion is to use this FEX file to display the 3D volume with high transparency https://www.mathworks.com/matlabcentral/...

How to view centers on a 3D image

One suggestion is to use this FEX file to display the 3D volume with high transparency https://www.mathworks.com/matlabcentral/...

6 Tage ago | 0

Answered

Comparing the performance of colon, loop, and cell indexing

I checked that it is indeed the case with the Run & Time feature. I don't know what that is, but the better test in any case i...

Comparing the performance of colon, loop, and cell indexing

I checked that it is indeed the case with the Run & Time feature. I don't know what that is, but the better test in any case i...

7 Tage ago | 2

Answered

Using 'fminunc', I receive Optimization completed because the size of the gradient is less than the value of the optimality tolerance.

If the problem doesn't have a solution satisfying the tolerance condition in your while loop (sum(abs(beta_u-beta_d))<0.1) the...

Using 'fminunc', I receive Optimization completed because the size of the gradient is less than the value of the optimality tolerance.

If the problem doesn't have a solution satisfying the tolerance condition in your while loop (sum(abs(beta_u-beta_d))<0.1) the...

7 Tage ago | 0

| accepted

Answered

Join table with different lengths

innerjoin(Grouped_Weight_position{i},Country)

Join table with different lengths

innerjoin(Grouped_Weight_position{i},Country)

7 Tage ago | 1

Answered

Replace array elements with another small array using indexing

b=strrep( strrep(a,[1 4 1],3) ,[3 4 1],2)

Replace array elements with another small array using indexing

b=strrep( strrep(a,[1 4 1],3) ,[3 4 1],2)

10 Tage ago | 0

Answered

Split values in an cell array by using a threshold

One way, A_lower = cellfun(@(x) x(x<threshold), A, 'uni',0); A_upper = cellfun(@(x) x(x>threshold), A, 'uni',0);

Split values in an cell array by using a threshold

One way, A_lower = cellfun(@(x) x(x<threshold), A, 'uni',0); A_upper = cellfun(@(x) x(x>threshold), A, 'uni',0);

10 Tage ago | 0

| accepted

Answered

Too many output argument error while using nested functions?

The code you've posted does not make it clear what problem you are encountering. There doesn't appear to be anything wrong in th...

Too many output argument error while using nested functions?

The code you've posted does not make it clear what problem you are encountering. There doesn't appear to be anything wrong in th...

10 Tage ago | 1

| accepted

Answered

How to multiply a scalar with matrix within loop and for each iteration store the values in new matrix?

There is no need for a loop: C=A.*reshape(b.^(0:n-1),1,1,[]);

How to multiply a scalar with matrix within loop and for each iteration store the values in new matrix?

There is no need for a loop: C=A.*reshape(b.^(0:n-1),1,1,[]);

10 Tage ago | 1

| accepted

Answered

Function lsqnonlin() has no optimization effect

And I have another question. My code has no optimization effect In this case, your initial guess already is optimal. You can se...

Function lsqnonlin() has no optimization effect

And I have another question. My code has no optimization effect In this case, your initial guess already is optimal. You can se...

11 Tage ago | 0

Answered

Linear Extrapolation with interp2

The only remedy I can think of is to pre-pad the edges of the data V with linearly extrapolated values at distant X, Y. That way...

Linear Extrapolation with interp2

The only remedy I can think of is to pre-pad the edges of the data V with linearly extrapolated values at distant X, Y. That way...

12 Tage ago | 0

Answered

overlaps() with only two polyshap objects

Use the two-argument form, Obstacles=[obstacle3 obstacle2]; criterion = sum( overlaps(car,Obstacles) ) == 1 ; %true if one a...

overlaps() with only two polyshap objects

Use the two-argument form, Obstacles=[obstacle3 obstacle2]; criterion = sum( overlaps(car,Obstacles) ) == 1 ; %true if one a...

12 Tage ago | 0

| accepted

Answered

Constraints on meshgrid. Remove points outside function

Just apply logical indexing on the appropriate region and set it to NaN, bad=(y<s11(s2)) | (y>s12(s2)); z(bad)=nan;

Constraints on meshgrid. Remove points outside function

Just apply logical indexing on the appropriate region and set it to NaN, bad=(y<s11(s2)) | (y>s12(s2)); z(bad)=nan;

12 Tage ago | 0

| accepted

Answered

How to run a curve approximation on a script using a function defined in a file and display the goodness of fit in a command window

You can't use the curve fit tool for a curve defined in an mfile. You can use lsqcurvefit, if you have the optimization toolbox,...

How to run a curve approximation on a script using a function defined in a file and display the goodness of fit in a command window

You can't use the curve fit tool for a curve defined in an mfile. You can use lsqcurvefit, if you have the optimization toolbox,...

12 Tage ago | 0

| accepted

Answered

Parallel Processing with Multipul GPUs - fftn

You can use gpuDevice() to select different GPUs for different calculations. gpuArray commands run asynchronously without blocki...

Parallel Processing with Multipul GPUs - fftn

You can use gpuDevice() to select different GPUs for different calculations. gpuArray commands run asynchronously without blocki...

13 Tage ago | 0

Answered

optimization based upon another optimization

You can write anything you want inside the code for your objective function, including other optimization processes. However, fm...

optimization based upon another optimization

You can write anything you want inside the code for your objective function, including other optimization processes. However, fm...

14 Tage ago | 0

Question

Finding handles to figure text

I am attempting to use findobj to retrieve text objects in a plot. For some reason, this fails (R2018a,b). In the following exam...

15 Tage ago | 1 answer | 0

Answered

fmincon nonlinear equality constraint

wopt = fmincon(NegPFMu, w0, [], [], Aeq, beq, lb,[], @(w) mycon(w, Cov, TargetVariance)); function [c, ceq] = mycon(w, Cov, T...

fmincon nonlinear equality constraint

wopt = fmincon(NegPFMu, w0, [], [], Aeq, beq, lb,[], @(w) mycon(w, Cov, TargetVariance)); function [c, ceq] = mycon(w, Cov, T...

17 Tage ago | 1

| accepted

Answered

Uniformly distributed points generation inside quadrilateral with given points

I haven't used it, but this FEX tool claims to be able to do it: https://www.mathworks.com/matlabcentral/fileexchange/71398-ran...

Uniformly distributed points generation inside quadrilateral with given points

I haven't used it, but this FEX tool claims to be able to do it: https://www.mathworks.com/matlabcentral/fileexchange/71398-ran...

17 Tage ago | 1

Answered

Fit a vector to matrix distribution

Can I just plug my new matrix into this and expect a distribution of values out for f1 and D1? I assume you already tried this ...

Fit a vector to matrix distribution

Can I just plug my new matrix into this and expect a distribution of values out for f1 and D1? I assume you already tried this ...

17 Tage ago | 0

Answered

Extract and show non zero pixels of a 2D image in MATLAB

The question seems very open ended. Perhaps as follows, spy(ima)

Extract and show non zero pixels of a 2D image in MATLAB

The question seems very open ended. Perhaps as follows, spy(ima)

18 Tage ago | 0

Answered

How to get the coordinates of each room in a floor plan image through object identification method?

One approach is to close all of the doors morphologically: load('Walls') e=ones(1,105); A=imclose(imclose(~Image,e),e.');...

How to get the coordinates of each room in a floor plan image through object identification method?

One approach is to close all of the doors morphologically: load('Walls') e=ones(1,105); A=imclose(imclose(~Image,e),e.');...

18 Tage ago | 0

| accepted

Submitted

Constrained minimum L1-norm solutions of linear equations

Finds least L1-norm solutions to linear equations C*x=d subject to linear and/or integer constraints.

19 Tage ago | 13 downloads |