5,037 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 run a loop for multiple variations of a variable.

v_d=zeros(50000,4); %<--change t(1)=0; dt=0.001; for i=1:1:50000 t(i+1)=t(i)+dt; u(i+1) = u(i)+ ...

How to run a loop for multiple variations of a variable.

v_d=zeros(50000,4); %<--change t(1)=0; dt=0.001; for i=1:1:50000 t(i+1)=t(i)+dt; u(i+1) = u(i)+ ...

3 hours ago | 0

Answered

FFT of a single sinusoid showing noise ?!

Looks normal to me, too. Aside from the fact that the sinusoid is discrete, it is also a truncated, non-periodic sampling, so th...

FFT of a single sinusoid showing noise ?!

Looks normal to me, too. Aside from the fact that the sinusoid is discrete, it is also a truncated, non-periodic sampling, so th...

4 hours ago | 0

Submitted

gaussfitn

Fit N-dimensional scattered points with Gaussian+constant

4 hours ago | 18 downloads |

Answered

Finding the adjoint of a Matrix

For numeric matrices, you can use <https://www.mathworks.com/matlabcentral/fileexchange/12692-adjugate-adjoint-of-a-square-matri...

Finding the adjoint of a Matrix

For numeric matrices, you can use <https://www.mathworks.com/matlabcentral/fileexchange/12692-adjugate-adjoint-of-a-square-matri...

5 hours ago | 0

Answered

Creating a set of equations programmatically

Your code already works fine. Each anonymous function Q{k} will use a different value for k, even if that isn't printed to the s...

Creating a set of equations programmatically

Your code already works fine. Each anonymous function Q{k} will use a different value for k, even if that isn't printed to the s...

7 hours ago | 1

| accepted

Answered

How could I randomly split the columns of a matrix into 3 matrices with equal number of columns?

Ar=A(:,randperm(12)); submatrix{1}=Ar(:,1:4); submatrix{2}=Ar(:,5:8); submatrix{3}=Ar(:,9:12);

How could I randomly split the columns of a matrix into 3 matrices with equal number of columns?

Ar=A(:,randperm(12)); submatrix{1}=Ar(:,1:4); submatrix{2}=Ar(:,5:8); submatrix{3}=Ar(:,9:12);

8 hours ago | 2

| accepted

Answered

List all functions needed to run an application

See <https://www.mathworks.com/help/matlab/ref/matlab.codetools.requiredfilesandproducts.html matlab.codetools.requiredFilesAnd...

List all functions needed to run an application

See <https://www.mathworks.com/help/matlab/ref/matlab.codetools.requiredfilesandproducts.html matlab.codetools.requiredFilesAnd...

9 hours ago | 0

Answered

Not understand function/command

It is not a command. |Frames| is the name of a variable which was created in the first line of the code you have posted.

Not understand function/command

It is not a command. |Frames| is the name of a variable which was created in the first line of the code you have posted.

12 hours ago | 0

Answered

Function used in fsolve with array coefficients

You should be passing ai to MyFun. The size of the ai array can be determined inside MyFun, and from that the number of coeffici...

Function used in fsolve with array coefficients

You should be passing ai to MyFun. The size of the ai array can be determined inside MyFun, and from that the number of coeffici...

21 hours ago | 0

| accepted

Answered

Matrix pre-allocation question

It is true that you have pre-allocated, but (a) you still aren't using that pre-allocated space for anything, and (b) you are st...

Matrix pre-allocation question

It is true that you have pre-allocated, but (a) you still aren't using that pre-allocated space for anything, and (b) you are st...

3 days ago | 1

| accepted

Answered

How can I convert a equation into an character array?

methods(Static) function surfplot(handles,X,Y,fun) %<---change s=surf(X,Y,fun(X,Y)); s...

How can I convert a equation into an character array?

methods(Static) function surfplot(handles,X,Y,fun) %<---change s=surf(X,Y,fun(X,Y)); s...

3 days ago | 2

| accepted

Answered

Faster approach of LU decomposition for a symmetric sparse matrix than lu in Matlab?

Is the matrix positive definite? If so, maybe CHOL?

Faster approach of LU decomposition for a symmetric sparse matrix than lu in Matlab?

Is the matrix positive definite? If so, maybe CHOL?

3 days ago | 0

| accepted

Answered

Faster inverse of a lower triangular matrix than inv(A)?

*The reason I want to obtain the inverse of A is that I need to select a number of rows from inv(A) for further uses. I do not j...

Faster inverse of a lower triangular matrix than inv(A)?

*The reason I want to obtain the inverse of A is that I need to select a number of rows from inv(A) for further uses. I do not j...

3 days ago | 0

| accepted

Answered

Getting rank deficient warning when performing linear regression on overdetermined system.

I recommend trying polyfit with centering and scaling, [line1,S,mu] = polyfit(pps1_adj(:,1),time1_adj,1)

Getting rank deficient warning when performing linear regression on overdetermined system.

I recommend trying polyfit with centering and scaling, [line1,S,mu] = polyfit(pps1_adj(:,1),time1_adj,1)

3 days ago | 0

| accepted

Answered

Specifying page dimensions in pagefun()

PAGEFUN always extracts pages by indexing the 3rd dimension. In other words the |i|-th page is always obtained as if by doing ...

Specifying page dimensions in pagefun()

PAGEFUN always extracts pages by indexing the 3rd dimension. In other words the |i|-th page is always obtained as if by doing ...

3 days ago | 2

| accepted

Answered

Bounding box around image

This might be a useful alternative, <https://www.mathworks.com/matlabcentral/fileexchange/21005-draw-a-border-around-an-image...

Bounding box around image

This might be a useful alternative, <https://www.mathworks.com/matlabcentral/fileexchange/21005-draw-a-border-around-an-image...

4 days ago | 0

Answered

Compare single element common at same indices in 2 matrixes and change values in third matrix

condition = (hValue == 0 & sValue == 0) | (hValue == 0.6 & sValue == 1); vValue(~condition) = 0.5;

Compare single element common at same indices in 2 matrixes and change values in third matrix

condition = (hValue == 0 & sValue == 0) | (hValue == 0.6 & sValue == 1); vValue(~condition) = 0.5;

4 days ago | 0

Answered

How to set my wave to 0 when >1 and <-1

x = sqrt(2)*cos(pi/2*t); x( abs(t)>1 ) =0 ;

How to set my wave to 0 when >1 and <-1

x = sqrt(2)*cos(pi/2*t); x( abs(t)>1 ) =0 ;

4 days ago | 0

Answered

Constrained minimization where one variable has to be bigger than another

Yes, you use the A,b inputs A=[-1,1]; b=0;

Constrained minimization where one variable has to be bigger than another

Yes, you use the A,b inputs A=[-1,1]; b=0;

5 days ago | 0

| accepted

Answered

Problem in GA algorithm (objective function is not drectly related to the variables)

You have called the function |damage_ele_1| with two arguments |kk| and 1 in the line if e == damage_ele_1(kk,1) However...

Problem in GA algorithm (objective function is not drectly related to the variables)

You have called the function |damage_ele_1| with two arguments |kk| and 1 in the line if e == damage_ele_1(kk,1) However...

5 days ago | 0

Answered

How do I create a structuring element of my own?

Elements outside the boundary of the matrix do not participate in the erosion/dilation. If you pad |aa| to a larger size, you wi...

How do I create a structuring element of my own?

Elements outside the boundary of the matrix do not participate in the erosion/dilation. If you pad |aa| to a larger size, you wi...

5 days ago | 0

| accepted

Answered

Finding a parabolic function having two known points and curve shape

p=polyfit([2-n, 1,n], [0, .03,0] ,2); y=polyval(p,1:n)

Finding a parabolic function having two known points and curve shape

p=polyfit([2-n, 1,n], [0, .03,0] ,2); y=polyval(p,1:n)

5 days ago | 0

| accepted

Answered

suppress output in command window from eval function

You have to put the semicolon _inside_ the command string, e.g., >> eval('a=75;') %No output Not this, >> eval(...

suppress output in command window from eval function

You have to put the semicolon _inside_ the command string, e.g., >> eval('a=75;') %No output Not this, >> eval(...

5 days ago | 0

| accepted

Answered

Repeat and shift array elementwise

b=cumsum(t); adelta=[0,ones(1, b(end)-1 )]; adelta(b(1:end-1)+1)=-t(1:end-1)+1; ashift=repelem(a,t) + ...

Repeat and shift array elementwise

b=cumsum(t); adelta=[0,ones(1, b(end)-1 )]; adelta(b(1:end-1)+1)=-t(1:end-1)+1; ashift=repelem(a,t) + ...

5 days ago | 0

| accepted

Answered

Splitting a matrix into group based into the first column and select the maximum value from the second column for each interval

You could use MAT2TILES <https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equal-sized-sub-...

Splitting a matrix into group based into the first column and select the maximum value from the second column for each interval

You could use MAT2TILES <https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equal-sized-sub-...

5 days ago | 0

Answered

How to use matlab to draw cubes？

Use the <https://www.mathworks.com/help/matlab/ref/patch.html |patch| command> to draw the faces of the cubes.

How to use matlab to draw cubes？

Use the <https://www.mathworks.com/help/matlab/ref/patch.html |patch| command> to draw the faces of the cubes.

5 days ago | 0

| accepted

Answered

Solve nonlinear equations within range

syms x y assume(x>=-1 & x<=1) f1 = x^2 + y^2 + x == 4 f2 = x^3 + y*2 == 2 [solx,soly]=vpasolve(f1,f2,x,y)

Solve nonlinear equations within range

syms x y assume(x>=-1 & x<=1) f1 = x^2 + y^2 + x == 4 f2 = x^3 + y*2 == 2 [solx,soly]=vpasolve(f1,f2,x,y)

5 days ago | 1

| accepted

Answered

How can I change the color and border of my bars on a hbar graph?

If Years1 is an Mx3 matrix, then you should automatically be getting 3 different colors already. Regardless, you can take contro...

How can I change the color and border of my bars on a hbar graph?

If Years1 is an Mx3 matrix, then you should automatically be getting 3 different colors already. Regardless, you can take contro...

5 days ago | 0

Answered

Is it possible to calculate the line of sight between two points in a 2d polygon?

I'm not sure if it would meet your needs speed-wise, but another option would be to use |intersectionHull| in <https://www.mathw...

Is it possible to calculate the line of sight between two points in a 2d polygon?

I'm not sure if it would meet your needs speed-wise, but another option would be to use |intersectionHull| in <https://www.mathw...

5 days ago | 0

Answered

How to apply function in vector form variable?

You should be using logical indexing expressions, like in the following. function S = function_1(T) S=nan(size(T))...

How to apply function in vector form variable?

You should be using logical indexing expressions, like in the following. function S = function_1(T) S=nan(size(T))...

6 days ago | 0

| accepted