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

Trasform 'values' inside table in numeric values always inside a table

One way, varfun(@(z) mean(str2double(z)) , yourTable(:,2:end))

Trasform 'values' inside table in numeric values always inside a table

One way, varfun(@(z) mean(str2double(z)) , yourTable(:,2:end))

5 hours ago | 0

Answered

Is there any other ways instead of using for loop for this one?

It would be better if A were just a 3D numeric array, Amat=cell2mat(reshape(A, size(A,1),1,[])) Then you could simply do, Ama...

Is there any other ways instead of using for loop for this one?

It would be better if A were just a 3D numeric array, Amat=cell2mat(reshape(A, size(A,1),1,[])) Then you could simply do, Ama...

16 hours ago | 0

Answered

How can I interpolate binary 2D matrices?

If the final, filled in region is convex, it can be obtained as follows layers=false(5,5,3) layers(:,:,1)=1; layers(3,3,3)=1;...

How can I interpolate binary 2D matrices?

If the final, filled in region is convex, it can be obtained as follows layers=false(5,5,3) layers(:,:,1)=1; layers(3,3,3)=1;...

23 hours ago | 0

| accepted

Answered

fsolve cant find a solution for some points

I'm not sure how Alex arrived at his results, however, his solution is reachable with even very modest improvements in the initi...

fsolve cant find a solution for some points

I'm not sure how Alex arrived at his results, however, his solution is reachable with even very modest improvements in the initi...

24 hours ago | 1

| accepted

Answered

How to locate the coordinates of a calculated distance below a certain threshold?

Wouldn't it just be subset = xyints(dist<12,:)

How to locate the coordinates of a calculated distance below a certain threshold?

Wouldn't it just be subset = xyints(dist<12,:)

24 hours ago | 0

| accepted

Answered

Coordinates of the shortest path between two points in a 2D grid

I'm not sure how I could describe the connections between each pair of points in the grid to make a graph of it. Creating the ...

Coordinates of the shortest path between two points in a 2D grid

I'm not sure how I could describe the connections between each pair of points in the grid to make a graph of it. Creating the ...

1 day ago | 1

| accepted

Answered

How to upsample a 3d point cloud?

Perhaps this is what you are trying to do, [x1,y1,z1] = sphere(24); %Given points (example) x1 = x1(:); y1 = y1(:); z1 = z1(...

How to upsample a 3d point cloud?

Perhaps this is what you are trying to do, [x1,y1,z1] = sphere(24); %Given points (example) x1 = x1(:); y1 = y1(:); z1 = z1(...

3 days ago | 1

| accepted

Answered

Tools used for Sparse Matrix Efficiency

Do not update the matrix A iteratively inside a for-loop. Just save the coordinate pairs and then use them after the loop to bui...

Tools used for Sparse Matrix Efficiency

Do not update the matrix A iteratively inside a for-loop. Just save the coordinate pairs and then use them after the loop to bui...

3 days ago | 2

Answered

Maximum likelihood Garch with fmincon

Check log_lk_GARCH11VIX(theta). It is returning a bad value.

Maximum likelihood Garch with fmincon

Check log_lk_GARCH11VIX(theta). It is returning a bad value.

3 days ago | 0

Answered

Rearranging rows of a boolean matrix so that the diagonals are all non-zero if possible

When your version works, it often works faster than the version below, however your version doesn't always get it right. I've at...

Rearranging rows of a boolean matrix so that the diagonals are all non-zero if possible

When your version works, it often works faster than the version below, however your version doesn't always get it right. I've at...

3 days ago | 0

Answered

How can I improve the accuracy of identifying local maxima

I don't think you have any hope of perfect recognition, but this result looks better to my non-clinical eye. A=rgb2gray(imread(...

How can I improve the accuracy of identifying local maxima

I don't think you have any hope of perfect recognition, but this result looks better to my non-clinical eye. A=rgb2gray(imread(...

4 days ago | 0

Answered

how to save file with the given size

This looks like it covers what you're looking for, https://www.mathworks.com/help/matlab/creating_plots/save-figure-at-specific...

how to save file with the given size

This looks like it covers what you're looking for, https://www.mathworks.com/help/matlab/creating_plots/save-figure-at-specific...

4 days ago | 0

| accepted

Submitted

group1s

Assign numerical labels to groups of ones in a binary vector

4 days ago | 1 download |

Answered

Error using extractfield in app designer

The error message has told you that rmdData, as fed to extractfield, is not a struct. You should check what it actually is, and...

Error using extractfield in app designer

The error message has told you that rmdData, as fed to extractfield, is not a struct. You should check what it actually is, and...

4 days ago | 0

Answered

Abrupt changes in data; 'ischange', means, and 'stairs'

Here is a method using the Image Processing Toolbox (treating the signal as a 1D image, in other words). load('dataTest.mat') ...

Abrupt changes in data; 'ischange', means, and 'stairs'

Here is a method using the Image Processing Toolbox (treating the signal as a 1D image, in other words). load('dataTest.mat') ...

4 days ago | 0

| accepted

Answered

Fuctions: Multiple inputs & outputs with if statements

No reason at all. And I don't see any disagreement: K>> [krw,kro] = rel_perm(1,1,1,1,1,1,1,1) krw = 0 kro = ...

Fuctions: Multiple inputs & outputs with if statements

No reason at all. And I don't see any disagreement: K>> [krw,kro] = rel_perm(1,1,1,1,1,1,1,1) krw = 0 kro = ...

4 days ago | 0

| accepted

Answered

can you solve the system below?

Yes, you can, e.g., https://www.mathworks.com/help/matlab/ref/linsolve.html

can you solve the system below?

Yes, you can, e.g., https://www.mathworks.com/help/matlab/ref/linsolve.html

4 days ago | 0

Answered

Why do I get different values when I run gamultiobj for my curve-fitting problem?

I'm not sure why you thought gamultiobj was appropriate for this. gamultiobj is a multi-objective optimizer and therefore will r...

Why do I get different values when I run gamultiobj for my curve-fitting problem?

I'm not sure why you thought gamultiobj was appropriate for this. gamultiobj is a multi-objective optimizer and therefore will r...

5 days ago | 0

Answered

Importing struct into app designer

The fieldnames command https://www.mathworks.com/help/matlab/ref/fieldnames.html Or, you could just do mergetable1=struct2tab...

Importing struct into app designer

The fieldnames command https://www.mathworks.com/help/matlab/ref/fieldnames.html Or, you could just do mergetable1=struct2tab...

5 days ago | 0

Answered

Abrupt changes in data; 'ischange', means, and 'stairs'

Yes, you can use splitapply(@mean,data,G) https://www.mathworks.com/help/matlab/ref/splitapply.html with G identifying the reg...

Abrupt changes in data; 'ischange', means, and 'stairs'

Yes, you can use splitapply(@mean,data,G) https://www.mathworks.com/help/matlab/ref/splitapply.html with G identifying the reg...

5 days ago | 0

Answered

Error "Index in position 1 exceeds array bounds (must not exceed 1)" for a matrix that has a size of 2000x11

I am getting the error as listed in the title for line 68 C(i,j)=(-lamda(i,j)+4*A(i,j)/3)/(Kl+4*G(i,j)/3); of the following co...

Error "Index in position 1 exceeds array bounds (must not exceed 1)" for a matrix that has a size of 2000x11

I am getting the error as listed in the title for line 68 C(i,j)=(-lamda(i,j)+4*A(i,j)/3)/(Kl+4*G(i,j)/3); of the following co...

5 days ago | 0

Answered

Z translate 3D matrix data

One way, [m,n,p]=size(M); [I,J,K]=ndgrid(1:m,1:n,1:p); Knew=K+T; result = accumarray([I(:),J(:),Knew(:)],M(:)),

Z translate 3D matrix data

One way, [m,n,p]=size(M); [I,J,K]=ndgrid(1:m,1:n,1:p); Knew=K+T; result = accumarray([I(:),J(:),Knew(:)],M(:)),

5 days ago | 0

Answered

Unable to perform assignment because the size of the left side is 2-by-1 and the size of the right side is 1-by-3.

This error message results from doing something like this: >> x=rand(2,3); >> x(:,1)=[4,5,6] Unable to perform assignment bec...

Unable to perform assignment because the size of the left side is 2-by-1 and the size of the right side is 1-by-3.

This error message results from doing something like this: >> x=rand(2,3); >> x(:,1)=[4,5,6] Unable to perform assignment bec...

5 days ago | 0

Answered

Lable dimensions of multidimensional array

There is no quick way to enable this, I'm afraid. You would have too write your own customized data object type and provide a su...

Lable dimensions of multidimensional array

There is no quick way to enable this, I'm afraid. You would have too write your own customized data object type and provide a su...

5 days ago | 0

Answered

Operator '.*' is not supported for operands of type 'cell'.

Well, you need to check whether B is a cell array or not (it almost certainly is). Did your call to cell2mat work?

Operator '.*' is not supported for operands of type 'cell'.

Well, you need to check whether B is a cell array or not (it almost certainly is). Did your call to cell2mat work?

5 days ago | 0

Answered

How to display fmincon output outside the command windows ? (Deported output)

The way to gain access to status information during the execution of fmincon is by using the OutputFcn option, https://www.math...

How to display fmincon output outside the command windows ? (Deported output)

The way to gain access to status information during the execution of fmincon is by using the OutputFcn option, https://www.math...

6 days ago | 1

| accepted

Answered

How to create a cell array with the content of a component of a structure?

It is not working because in your for-loop, yourcell is never indexed by the loop variable i, so the loop code has no idea where...

How to create a cell array with the content of a component of a structure?

It is not working because in your for-loop, yourcell is never indexed by the loop variable i, so the loop code has no idea where...

6 days ago | 1

| accepted

Answered

Identify the minimum number of rows in a matrix meeting a condition

This solution uses the Optimization Toolbox, although I am still only half certain what row-selection rule you are looking for ...

Identify the minimum number of rows in a matrix meeting a condition

This solution uses the Optimization Toolbox, although I am still only half certain what row-selection rule you are looking for ...

6 days ago | 1

| accepted

Answered

Find max/min level of all intersections of a given contour curve with another set of contour curves

A method more along the lines of what you outlined in your initial post, is to put the x,y pairs of the i-th level set of A into...

Find max/min level of all intersections of a given contour curve with another set of contour curves

A method more along the lines of what you outlined in your initial post, is to put the x,y pairs of the i-th level set of A into...

7 days ago | 0

Answered

Find max/min level of all intersections of a given contour curve with another set of contour curves

The problem you describe cannot be well-defined in terms of discrete contour samples, because there are infinite choices of func...

Find max/min level of all intersections of a given contour curve with another set of contour curves

The problem you describe cannot be well-defined in terms of discrete contour samples, because there are infinite choices of func...

7 days ago | 0