6.190 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

Non linear least square fitting

Ok. Could you possibly show me the analytical alternatives to Adam's solution? See attached. Note that my method does not mini...

Non linear least square fitting

Ok. Could you possibly show me the analytical alternatives to Adam's solution? See attached. Note that my method does not mini...

ongeveer 9 uur ago | 2

Answered

How can I use graph object info to find: areas, number of sides, and perimeter lengths of a each connected polygon within a network of polygons?

Using one of my recent FEX postings, https://www.mathworks.com/matlabcentral/fileexchange/73630-spatialgraph2d you should be a...

How can I use graph object info to find: areas, number of sides, and perimeter lengths of a each connected polygon within a network of polygons?

Using one of my recent FEX postings, https://www.mathworks.com/matlabcentral/fileexchange/73630-spatialgraph2d you should be a...

ongeveer 10 uur ago | 0

Submitted

spatialgraph2D

Creates a graph object with 2D spatial locations associated with the nodes

ongeveer 10 uur ago | 0 downloads |

Answered

return the numerator and denimentor

If x is a symbolic variable, then yes >> x=sym(1/2); >> [n,d]=numden(x) n = 1 d = 2

return the numerator and denimentor

If x is a symbolic variable, then yes >> x=sym(1/2); >> [n,d]=numden(x) n = 1 d = 2

ongeveer 12 uur ago | 0

Answered

vectorize high dimensional image

result = reshape(yourImage,[],102).';

vectorize high dimensional image

result = reshape(yourImage,[],102).';

ongeveer 13 uur ago | 0

| accepted

Answered

How to replace elements of a matrix with the scaled identity?

B=kron(A,eye(n))

How to replace elements of a matrix with the scaled identity?

B=kron(A,eye(n))

ongeveer 13 uur ago | 1

| accepted

Answered

Convert matrix 3d into 2d

Calling your matrix A, Acell=num2cell(A,[1,2]);

Convert matrix 3d into 2d

Calling your matrix A, Acell=num2cell(A,[1,2]);

ongeveer 13 uur ago | 1

Answered

How to move indexed files say file_1, file_2, file_3 to indexed folder_1, folder_2, folder 3. I am using for loop to create these folders and files in an indexed and automatic manner.....but how to move these files into these folders...Plz help

>> Files="file_"+(1:5) Files = 1×5 string array "file_1" "file_2" "file_3" "file_4" "file_5" >> F...

How to move indexed files say file_1, file_2, file_3 to indexed folder_1, folder_2, folder 3. I am using for loop to create these folders and files in an indexed and automatic manner.....but how to move these files into these folders...Plz help

>> Files="file_"+(1:5) Files = 1×5 string array "file_1" "file_2" "file_3" "file_4" "file_5" >> F...

2 dagen ago | 1

| accepted

Answered

Find an optimal solution for a system with matrix

f=-A(:); Aineq=[B(:),C(:)].'; bineq=[4;3] Xoptimal=linprog(f,Aineq,bineq)

Find an optimal solution for a system with matrix

f=-A(:); Aineq=[B(:),C(:)].'; bineq=[4;3] Xoptimal=linprog(f,Aineq,bineq)

2 dagen ago | 0

Answered

Trying to plot Eulers, but keep getting straight line

You're getting a straight line because the right hand side of this line acmi(1:10001)=-a+(alpha(n)*l*cos(theta(n)))-((omega(n)^...

Trying to plot Eulers, but keep getting straight line

You're getting a straight line because the right hand side of this line acmi(1:10001)=-a+(alpha(n)*l*cos(theta(n)))-((omega(n)^...

3 dagen ago | 0

Answered

how to write a function for quadratic equation

[x1,x2] = QuadraticEquation (1,-2,0) function [x1,x2] = QuadraticEquation (a,b,c) d=b^2-4*a*c; if d>=0 disp ('...

how to write a function for quadratic equation

[x1,x2] = QuadraticEquation (1,-2,0) function [x1,x2] = QuadraticEquation (a,b,c) d=b^2-4*a*c; if d>=0 disp ('...

3 dagen ago | 0

| accepted

Answered

multi-variable optimization in matlab?

Many other variables are to be calculated first, which are actually functions of the first two variables, and then they're used ...

multi-variable optimization in matlab?

Many other variables are to be calculated first, which are actually functions of the first two variables, and then they're used ...

3 dagen ago | 0

| accepted

Answered

Call a function in a sub directory?

The only way, I believe, is to visit each folder and create a function handle to each respective version of sayhi(), cd folder1...

Call a function in a sub directory?

The only way, I believe, is to visit each folder and create a function handle to each respective version of sayhi(), cd folder1...

3 dagen ago | 0

Answered

Map a 2D matrix into 3D using loop for allotment along the 3rd dimension

You could try this. clear data_trialwise for i=20:-1:1 data_trialwise(:,:,i)=data(:,begin(i):end(i)); % begin and end bot...

Map a 2D matrix into 3D using loop for allotment along the 3rd dimension

You could try this. clear data_trialwise for i=20:-1:1 data_trialwise(:,:,i)=data(:,begin(i):end(i)); % begin and end bot...

3 dagen ago | 0

Answered

shifted triangular matrix array

ac=num2cell([0,0;a],2); T=toeplitz(1:4,[1,zeros(1,3)]); A=cell2mat(ac(T+1)) A = 1 2 0 0 0 ...

shifted triangular matrix array

ac=num2cell([0,0;a],2); T=toeplitz(1:4,[1,zeros(1,3)]); A=cell2mat(ac(T+1)) A = 1 2 0 0 0 ...

3 dagen ago | 1

| accepted

Answered

How can i multiply cell arrays?

for i=1:2 for j=1:2 H{i,j}=H{i,j}.*X{i}; end end

How can i multiply cell arrays?

for i=1:2 for j=1:2 H{i,j}=H{i,j}.*X{i}; end end

3 dagen ago | 0

| accepted

Answered

Most efficient way to enter values into pre-allocated sparse matrix?

I would just store all the data from the loop calculations in cells. Then use the data to build the sparse matrix after the loop...

Most efficient way to enter values into pre-allocated sparse matrix?

I would just store all the data from the loop calculations in cells. Then use the data to build the sparse matrix after the loop...

4 dagen ago | 0

| accepted

Answered

Is possible configure matlab to get a+[ ]=a?

You could also replace your plus() operations with sum() operations. Compare: >> a=3; b=[]; >> a+b ans = [] >>...

Is possible configure matlab to get a+[ ]=a?

You could also replace your plus() operations with sum() operations. Compare: >> a=3; b=[]; >> a+b ans = [] >>...

5 dagen ago | 1

Answered

Is possible configure matlab to get a+[ ]=a?

No way that you're going like. You could subclass Matlab's double type https://www.mathworks.com/help/matlab/matlab_oop/extend-...

Is possible configure matlab to get a+[ ]=a?

No way that you're going like. You could subclass Matlab's double type https://www.mathworks.com/help/matlab/matlab_oop/extend-...

5 dagen ago | 1

Answered

Error using griddedInterpolant The grid vectors do not define a grid of points that match the given values.

You have 20 Y samples, but your V has 21 rows. >> whos X Y V Name Size Bytes Class Attributes V ...

Error using griddedInterpolant The grid vectors do not define a grid of points that match the given values.

You have 20 Y samples, but your V has 21 rows. >> whos X Y V Name Size Bytes Class Attributes V ...

5 dagen ago | 0

| accepted

Answered

Average of every nth value in a vector

tmp=conv(yourvector, ones(600,1)/600,'valid'); result=tmp(1:600:end)

Average of every nth value in a vector

tmp=conv(yourvector, ones(600,1)/600,'valid'); result=tmp(1:600:end)

6 dagen ago | 0

Answered

3-D line of best fit from origin to cloud of data points

The equation is t*u where u is 3D line direction vector obtained by, [V,d]=eig(A.'*A,'vector'); [~,i]=max(d); u=V(:,i); and ...

3-D line of best fit from origin to cloud of data points

The equation is t*u where u is 3D line direction vector obtained by, [V,d]=eig(A.'*A,'vector'); [~,i]=max(d); u=V(:,i); and ...

6 dagen ago | 0

Answered

Multi-function optimization

You would need something like the following, options=optimoptions(@fminunc,'SpecifyObjectiveGradient', true); allX = fminunc...

Multi-function optimization

You would need something like the following, options=optimoptions(@fminunc,'SpecifyObjectiveGradient', true); allX = fminunc...

6 dagen ago | 0

| accepted

Answered

2D Convex Hull: I can't think of a 'criteria' to filter out the 'wrong' points, please help!

One thing you can also try to do is find where one of the rays from the pivot point lies inside the triangle formed by its two n...

2D Convex Hull: I can't think of a 'criteria' to filter out the 'wrong' points, please help!

One thing you can also try to do is find where one of the rays from the pivot point lies inside the triangle formed by its two n...

7 dagen ago | 0

Answered

I am calculating membrane water flux using fsolve but MATLAB gave me a negative value of water flux (Jw) as follows. I don't know how to avoid these negative solution from non-linear equation so I would like to know how to solve it correctly

Since you only have single unknown, you should probably use fzero. With fzero you can specify a bounded interval within which to...

I am calculating membrane water flux using fsolve but MATLAB gave me a negative value of water flux (Jw) as follows. I don't know how to avoid these negative solution from non-linear equation so I would like to know how to solve it correctly

Since you only have single unknown, you should probably use fzero. With fzero you can specify a bounded interval within which to...

7 dagen ago | 0

Answered

Radon Transform Documentation Matlab

I understand the Radon Transform get the product between the length(intersection) of each beam through the pixel and the pixel ...

Radon Transform Documentation Matlab

I understand the Radon Transform get the product between the length(intersection) of each beam through the pixel and the pixel ...

7 dagen ago | 1

Answered

Why do the values not get added into the array such as [2,3,5,7], but instead they get summed up?

Because you are using '+'. To concatenate, you would do, values = [values, tester];

Why do the values not get added into the array such as [2,3,5,7], but instead they get summed up?

Because you are using '+'. To concatenate, you would do, values = [values, tester];

7 dagen ago | 0

| accepted