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.

Question

Incremental median across pages of a 3D array

I am trying to compute the inter-page median, B=median(A,3) of a 3D array A except that A is too large to be held in memory i...

alrededor de 21 horas ago | 0 answers | 0

Answered

Undefined operator '<=' for input arguments of type 'struct'.

It would appear that b= get(handles.TableFitur); has set b to a structure variable, whereas you expected it to be a scalar nu...

Undefined operator '<=' for input arguments of type 'struct'.

It would appear that b= get(handles.TableFitur); has set b to a structure variable, whereas you expected it to be a scalar nu...

1 día ago | 0

| accepted

Answered

Remove successive rows from a table where a specific column value is duplicated

idx = diff([inf;findgroups(A.site)])~=0; A = A(idx,:)

Remove successive rows from a table where a specific column value is duplicated

idx = diff([inf;findgroups(A.site)])~=0; A = A(idx,:)

1 día ago | 1

| accepted

Answered

Separating Matrix Rows into two different vectors

A=[1 3 5;1 5 6;3 9 10;3 5 6;1 4 5;3 5 6; 9 6 7; 1 5 8; 3 6 0]; groups=splitapply( @(X) {X} , A , findgroups(A(:,1)) ); [a...

Separating Matrix Rows into two different vectors

A=[1 3 5;1 5 6;3 9 10;3 5 6;1 4 5;3 5 6; 9 6 7; 1 5 8; 3 6 0]; groups=splitapply( @(X) {X} , A , findgroups(A(:,1)) ); [a...

3 días ago | 0

Answered

Finding longest subvector of equal elements in 5000000 length int-vector.

data=[1,1,1,2,2,3,3,4,4]; sequenceLengths = diff( find( diff([inf,data,inf]) ) ) ; result = histcounts(sequenceLengths, 1:...

Finding longest subvector of equal elements in 5000000 length int-vector.

data=[1,1,1,2,2,3,3,4,4]; sequenceLengths = diff( find( diff([inf,data,inf]) ) ) ; result = histcounts(sequenceLengths, 1:...

3 días ago | 0

| accepted

Answered

Efficient method to find all intersections of triangulation edges?

The closed form parametric solution for the intersection of two edges is easily derived using the Symbolic Toolbox: syms xa xb ...

Efficient method to find all intersections of triangulation edges?

The closed form parametric solution for the intersection of two edges is easily derived using the Symbolic Toolbox: syms xa xb ...

4 días ago | 0

Answered

Compute approximative common eigenvectors basis between two matrices as a function of tolerance

rather building an approximative common eigenvectors basis X between 2 matrices A and B such as : A X_i = a_i X_i and B X_i = b...

Compute approximative common eigenvectors basis between two matrices as a function of tolerance

rather building an approximative common eigenvectors basis X between 2 matrices A and B such as : A X_i = a_i X_i and B X_i = b...

4 días ago | 0

Answered

interpolate 3D plane

https://www.mathworks.com/matlabcentral/answers/723053-solve-plane-equation-with-3-points-and-additional-condition#answer_603073...

interpolate 3D plane

https://www.mathworks.com/matlabcentral/answers/723053-solve-plane-equation-with-3-points-and-additional-condition#answer_603073...

4 días ago | 1

Answered

search smaller string array to bigger string array

selected={'a', 'gg' 'c'}; Alllist={'a', 'b' ,'d' 'ee' ,'ff' 'gg'}; mask = ~ismember(selected,Alllist) or mask = ~contains(...

search smaller string array to bigger string array

selected={'a', 'gg' 'c'}; Alllist={'a', 'b' ,'d' 'ee' ,'ff' 'gg'}; mask = ~ismember(selected,Alllist) or mask = ~contains(...

4 días ago | 0

| accepted

Answered

Solve plane equation with 3 points and additional condition

You can use my planefit() utility [abc,d]=planefit([p1;p2;p3].'); d=-d; function varargout=planefit(xyz) %Fit 3D plane to ...

Solve plane equation with 3 points and additional condition

You can use my planefit() utility [abc,d]=planefit([p1;p2;p3].'); d=-d; function varargout=planefit(xyz) %Fit 3D plane to ...

5 días ago | 0

Answered

Sort a n array for maximum number of recurring values and storing the indexes corresponding to erased components

a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9]; s=diff([inf,a])~=0; ...

Sort a n array for maximum number of recurring values and storing the indexes corresponding to erased components

a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9]; s=diff([inf,a])~=0; ...

6 días ago | 0

| accepted

Answered

how I can draw the graph for system of equation when x and y variables are coming inside the coefficients matrix.

A system of 2 equations in 2 unknowns generally has a finite number of solutions. It therefore does not define y as a function o...

how I can draw the graph for system of equation when x and y variables are coming inside the coefficients matrix.

A system of 2 equations in 2 unknowns generally has a finite number of solutions. It therefore does not define y as a function o...

6 días ago | 1

Answered

How to plot this implicit function？

It doesn't appear to be a very interesting function. fun=@(Delta,f) (9*(Delta/10)^(1/2))/125 + (pi - atan((18*f*pi*(Delta/10)^(...

How to plot this implicit function？

It doesn't appear to be a very interesting function. fun=@(Delta,f) (9*(Delta/10)^(1/2))/125 + (pi - atan((18*f*pi*(Delta/10)^(...

7 días ago | 0

Answered

Summing up rows of a cell containing 3D matrices

C=reshape( cat(2,Cell{:}) ,[30,30,5,5,30]); Final=reshape( sum(C,3) , 30,150,30);

Summing up rows of a cell containing 3D matrices

C=reshape( cat(2,Cell{:}) ,[30,30,5,5,30]); Final=reshape( sum(C,3) , 30,150,30);

7 días ago | 1

| accepted

Answered

How to find the first zero element in any column of a m by n matrix

I don't understand what your posted code is trying to accomplish, but you can find the first zero in each row without looping as...

How to find the first zero element in any column of a m by n matrix

I don't understand what your posted code is trying to accomplish, but you can find the first zero in each row without looping as...

7 días ago | 0

Answered

Generating mathematical equation from known discrete values of frequency, amplitude and phase

No, there is no reason why a closed form equation would exist for any arbitrary signal. However, you can interpolate the discret...

Generating mathematical equation from known discrete values of frequency, amplitude and phase

No, there is no reason why a closed form equation would exist for any arbitrary signal. However, you can interpolate the discret...

7 días ago | 0

Answered

How can I create a 22x22 Matrix from 231 values of the triangular matrix?

load(websave('Tri.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/493054/Tri.mat')); N=roots([1,1,-2*num...

How can I create a 22x22 Matrix from 231 values of the triangular matrix?

load(websave('Tri.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/493054/Tri.mat')); N=roots([1,1,-2*num...

7 días ago | 1

| accepted

Answered

How do I create a matrix based on another matrix?

NumElem=4; N=[1 0 1 0; 3 0 1 1]; E=zeros(NumElem,3); E(N(:,1),:)=N(:,2:end)

How do I create a matrix based on another matrix?

NumElem=4; N=[1 0 1 0; 3 0 1 1]; E=zeros(NumElem,3); E(N(:,1),:)=N(:,2:end)

7 días ago | 0

| accepted

Answered

Error in fsolve (line 219) fuser = feval(funfcn{3},x,varargin{:}); Caused by: Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.

This usually means that you didn't test your objective function to verify that it works before giving it to fsolve.

Error in fsolve (line 219) fuser = feval(funfcn{3},x,varargin{:}); Caused by: Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.

This usually means that you didn't test your objective function to verify that it works before giving it to fsolve.

7 días ago | 0

Answered

How can I use fmincon into the SPMD when the parameters of objective function differs from on workers to another?

You can use spmd to create the u data on the workers, but then use a parfor loop to do the optimizations. spmd u=labindex; %c...

How can I use fmincon into the SPMD when the parameters of objective function differs from on workers to another?

You can use spmd to create the u data on the workers, but then use a parfor loop to do the optimizations. spmd u=labindex; %c...

7 días ago | 0

Answered

Linear Interpolation code ...

p=interp1(x,y, ceil(x(1)):floor(x(end)) );

Linear Interpolation code ...

p=interp1(x,y, ceil(x(1)):floor(x(end)) );

7 días ago | 1

| accepted

Answered

Multiple Parameters in fmincon

I'm not sure why you are using fmincon for something that has a simple, non-iterative solution: C=[cov1(:).^0,cov1(:),cov2(:)];...

Multiple Parameters in fmincon

I'm not sure why you are using fmincon for something that has a simple, non-iterative solution: C=[cov1(:).^0,cov1(:),cov2(:)];...

7 días ago | 2

Answered

How to find a value X of given Y close to 0, where the value X comes at the first place

damp_ratio=[ -100.00 -100.00 -100.00 -100.00 -100.00 -100.00 -100.00 100.00 100.00 100.00 100.00 ...

How to find a value X of given Y close to 0, where the value X comes at the first place

damp_ratio=[ -100.00 -100.00 -100.00 -100.00 -100.00 -100.00 -100.00 100.00 100.00 100.00 100.00 ...

7 días ago | 0

| accepted

Answered

Replace diagonals in a matrix

For example, A=rand(10), mask=tril( triu( true(size(A)), -2 ), +2); B=A.*mask

Replace diagonals in a matrix

For example, A=rand(10), mask=tril( triu( true(size(A)), -2 ), +2); B=A.*mask

7 días ago | 0

| accepted

Answered

ROI of a ring area?

For example, [x,y]=deal(1:1000); dsq=(x-400).^2 + (y(:)-300).^2; ROI = (50^2<=dsq & dsq<=100^2 ); imshow(ROI)

ROI of a ring area?

For example, [x,y]=deal(1:1000); dsq=(x-400).^2 + (y(:)-300).^2; ROI = (50^2<=dsq & dsq<=100^2 ); imshow(ROI)

7 días ago | 0

Answered

indexing a set in an array

[k,l]=deal(1:1000); SET=(k.'-k0).^2+(l-lo).^2 < R^2;

indexing a set in an array

[k,l]=deal(1:1000); SET=(k.'-k0).^2+(l-lo).^2 < R^2;

7 días ago | 0

| accepted

Answered

HOW TO SHIFT COLUMN AND ROW MATRIX

x=repmat([1 2 3 4],4,1); x(6,6)=0 perm=[1,2,5,6,3,4]; x(perm,perm),

HOW TO SHIFT COLUMN AND ROW MATRIX

x=repmat([1 2 3 4],4,1); x(6,6)=0 perm=[1,2,5,6,3,4]; x(perm,perm),

7 días ago | 1

| accepted

Answered

Calculation of Rotation in 3D space

You can use absor() https://www.mathworks.com/matlabcentral/fileexchange/26186-absolute-orientation-horn-s-method to register ...

Calculation of Rotation in 3D space

You can use absor() https://www.mathworks.com/matlabcentral/fileexchange/26186-absolute-orientation-horn-s-method to register ...

8 días ago | 1

Answered

how to change values within an array to NaN

zn = F(xn,yn); bad = (1280 <= xn & xn<=1950) & (3025 <= yn & yn <= 4000) ; zn(bad)=nan;

how to change values within an array to NaN

zn = F(xn,yn); bad = (1280 <= xn & xn<=1950) & (3025 <= yn & yn <= 4000) ; zn(bad)=nan;

8 días ago | 0

| accepted

Answered

Failure in initial objective function evaluation in FMINCON function

This loop does not make sense, because in the workspace of Cost(), the variable U only has 1 column. for i=1:Np x(: ...

Failure in initial objective function evaluation in FMINCON function

This loop does not make sense, because in the workspace of Cost(), the variable U only has 1 column. for i=1:Np x(: ...

9 días ago | 0