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

Answered

How to join matching rows of cells in a particular column order

Not sure why you're working with cells, rather than tables, but it's easy enough to switch back and forth. A=cell2table(a); ...

How to join matching rows of cells in a particular column order

Not sure why you're working with cells, rather than tables, but it's easy enough to switch back and forth. A=cell2table(a); ...

1 día ago | 0

| accepted

Answered

fsolve and "Equation solved, fsolve stalled"

It means stopping criteria for the iterations were met. Fsolve cannot find a reason to continue.

fsolve and "Equation solved, fsolve stalled"

It means stopping criteria for the iterations were met. Fsolve cannot find a reason to continue.

1 día ago | 0

Answered

Orthogonal vectors, how to code?

Any two such vectors will have this parametric form, w= [0 cos(theta) sin(theta)] v=c*[0 -sin(theta) cos(theta)] where c=+1 ...

Orthogonal vectors, how to code?

Any two such vectors will have this parametric form, w= [0 cos(theta) sin(theta)] v=c*[0 -sin(theta) cos(theta)] where c=+1 ...

1 día ago | 0

Answered

comparing 3x3 block with center pixel

Here, X is the input matrix. result=0; result=result+1*rot90(fkernel(rot90(X,+1)),-1); result=result+2*rot90(fkernel(rot90(X,...

comparing 3x3 block with center pixel

Here, X is the input matrix. result=0; result=result+1*rot90(fkernel(rot90(X,+1)),-1); result=result+2*rot90(fkernel(rot90(X,...

2 días ago | 2

| accepted

Answered

Can someone propose some code that will "connect the dots" using circular arcs?

I have attached a version of TripletGraph.m which implements methods of joining the points with ideal circular arcs, as well as ...

Can someone propose some code that will "connect the dots" using circular arcs?

I have attached a version of TripletGraph.m which implements methods of joining the points with ideal circular arcs, as well as ...

4 días ago | 0

Answered

Can someone propose some code that will "connect the dots" using circular arcs?

The spline plotting that we came up with in our previous conversation looked like this for i=1:N ...

Can someone propose some code that will "connect the dots" using circular arcs?

The spline plotting that we came up with in our previous conversation looked like this for i=1:N ...

5 días ago | 0

Answered

interp1 fails to interpolate correctly

X needs to be montonically increasing (or interp1 will pre-sort the data so that it is).

interp1 fails to interpolate correctly

X needs to be montonically increasing (or interp1 will pre-sort the data so that it is).

5 días ago | 0

| accepted

Answered

Using polyfit and polyval functions with data

I wonder if what you are really trying to do is a fillmissing operation, instead of a linear fit to the data, a=[1;2;3;4;5;nan;...

Using polyfit and polyval functions with data

I wonder if what you are really trying to do is a fillmissing operation, instead of a linear fit to the data, a=[1;2;3;4;5;nan;...

5 días ago | 0

Answered

Using polyfit and polyval functions with data

To do what you were after in your post, you need to fit with the NotMissing data, but then apply the fit at all days, a=[1;2;3;...

Using polyfit and polyval functions with data

To do what you were after in your post, you need to fit with the NotMissing data, but then apply the fit at all days, a=[1;2;3;...

5 días ago | 1

| accepted

Answered

integers to English phrase

As a further hint, consider the following version, which is almost what you want function S = convert_to_words(number) ones...

integers to English phrase

As a further hint, consider the following version, which is almost what you want function S = convert_to_words(number) ones...

7 días ago | 0

| accepted

Answered

Create an array of handle objects using for-loop

Undoubtedly, you meant to have for i = 1:-0.1:0.9 for j = 1:-0.1:0.9

Create an array of handle objects using for-loop

Undoubtedly, you meant to have for i = 1:-0.1:0.9 for j = 1:-0.1:0.9

7 días ago | 0

| accepted

Answered

Optimise the problem question

You should be using linprog to solve this problem. It does not require a starting point x0. I don't see any need for equality co...

Optimise the problem question

You should be using linprog to solve this problem. It does not require a starting point x0. I don't see any need for equality co...

7 días ago | 0

Answered

How I do evaluate a function handle in other function handle

What you probably have to do is use ode45 or similar to solve the differential equation dy/dx = f(x,y) on some interval. Then, f...

How I do evaluate a function handle in other function handle

What you probably have to do is use ode45 or similar to solve the differential equation dy/dx = f(x,y) on some interval. Then, f...

7 días ago | 0

Answered

Extract submatrix from matrix.

>> S=regionprops(yourMatrix>0,'Image'); >> S.Image ans = 2×2 logical array 1 1 1 1 ans = 2×3 lo...

Extract submatrix from matrix.

>> S=regionprops(yourMatrix>0,'Image'); >> S.Image ans = 2×2 logical array 1 1 1 1 ans = 2×3 lo...

7 días ago | 1

Answered

Update graph (Graph Theory)?

Perhaps like this, hold on H = subgraph(G,idx); %new part of graph plot(H,'Layout','force','XData',___, 'YData',_____) ...

Update graph (Graph Theory)?

Perhaps like this, hold on H = subgraph(G,idx); %new part of graph plot(H,'Layout','force','XData',___, 'YData',_____) ...

7 días ago | 0

| accepted

Answered

fit options in a parfor loop

A guess as to why this might be happening is that fitoptions objects don't seem to implement proper save/load behavior, as indic...

fit options in a parfor loop

A guess as to why this might be happening is that fitoptions objects don't seem to implement proper save/load behavior, as indic...

7 días ago | 2

Answered

Something strange in MATLAB

Chances are the issue is not in the code, but in the new data that you have supplied as input. For some reason, this input data ...

Something strange in MATLAB

Chances are the issue is not in the code, but in the new data that you have supplied as input. For some reason, this input data ...

7 días ago | 0

Answered

How I do evaluate a function handle in other function handle

I think this line needs to be g=@(x,y) f(x,y)*p_y(f,x,y) + p_x(f,x,y);

How I do evaluate a function handle in other function handle

I think this line needs to be g=@(x,y) f(x,y)*p_y(f,x,y) + p_x(f,x,y);

7 días ago | 0

Answered

How to average more than 50 3D matrices using nanmean

Here's what I would do, I suppose. It assumes each of your .mat files stores the volume under the name 'a'. Summation=0; NCoun...

How to average more than 50 3D matrices using nanmean

Here's what I would do, I suppose. It assumes each of your .mat files stores the volume under the name 'a'. Summation=0; NCoun...

7 días ago | 2

| accepted

Answered

The best way to code this optimization problem

I have matlab 2013b Because the array sizes are fairly small here, the easiest thing might be to use my func2mat submission to ...

The best way to code this optimization problem

I have matlab 2013b Because the array sizes are fairly small here, the easiest thing might be to use my func2mat submission to ...

8 días ago | 0

Answered

Is there any way to fill this shape?

I=imread('shapes.jpg'); % to extract orange color A=(I(:,:,1) >= 245 ) & (I(:,:,1) <= 255) & ... (I(:,:,2) >= 121 ) & (I(:,:...

Is there any way to fill this shape?

I=imread('shapes.jpg'); % to extract orange color A=(I(:,:,1) >= 245 ) & (I(:,:,1) <= 255) & ... (I(:,:,2) >= 121 ) & (I(:,:...

8 días ago | 0

| accepted

Answered

How to use options in fsolve

I know that i have to do fsolve(@(x) myfunz,x0,options) I don't think so. The exit message says "Equation solved". Another ...

How to use options in fsolve

I know that i have to do fsolve(@(x) myfunz,x0,options) I don't think so. The exit message says "Equation solved". Another ...

8 días ago | 0

| accepted

Answered

The best way to code this optimization problem

It should be very straightforward using the problem-based solvers in the Optimization Toolbox, https://www.mathworks.com/help/o...

The best way to code this optimization problem

It should be very straightforward using the problem-based solvers in the Optimization Toolbox, https://www.mathworks.com/help/o...

8 días ago | 1

Answered

how do i create a random matrix with set size yet the numbers are in a range from 0-9

randi([0,9],4,6) %random integers or 9*rand(4,6) %non-integers

how do i create a random matrix with set size yet the numbers are in a range from 0-9

randi([0,9],4,6) %random integers or 9*rand(4,6) %non-integers

8 días ago | 0

| accepted

Answered

Error while using blockproc. Matrix dimensions must agree.

Matrix dimensions must agree. Error in dct (line 76) b = W .* fft(y); It would appear that W and y are not the same size....

Error while using blockproc. Matrix dimensions must agree.

Matrix dimensions must agree. Error in dct (line 76) b = W .* fft(y); It would appear that W and y are not the same size....

9 días ago | 1

| accepted

Answered

how can i bound rate of changes (dx/dt) in fmincon optimization?

See https://www.mathworks.com/matlabcentral/answers/490758-limit-on-the-change-rate-of-the-variable-in-fmincon-function#answer_...

how can i bound rate of changes (dx/dt) in fmincon optimization?

See https://www.mathworks.com/matlabcentral/answers/490758-limit-on-the-change-rate-of-the-variable-in-fmincon-function#answer_...

9 días ago | 0

Answered

Limit on the change rate of the variable in fmincon function

You would build linear inequality matrices like the following. E=diff(eye(numel(u))); A=[E;-E]; b=[ub(:);-lb(:)]; %linear ...

Limit on the change rate of the variable in fmincon function

You would build linear inequality matrices like the following. E=diff(eye(numel(u))); A=[E;-E]; b=[ub(:);-lb(:)]; %linear ...

10 días ago | 1

| accepted

Answered

Multiplication in cell arrays

result = cat(3,precip{:}).*reshape(numbers,1,1,[]); There seems little reason either for precip to be a cell array or to turn t...

Multiplication in cell arrays

result = cat(3,precip{:}).*reshape(numbers,1,1,[]); There seems little reason either for precip to be a cell array or to turn t...

10 días ago | 0

Answered

Regular expression for 1*1 cell array

c='<string_attribute name="country"><s>CHINA5</s></string_attribute>'; out=extractBetween(c,'<s>','</s>'); >> out{1} an...

Regular expression for 1*1 cell array

c='<string_attribute name="country"><s>CHINA5</s></string_attribute>'; out=extractBetween(c,'<s>','</s>'); >> out{1} an...

10 días ago | 1