Maths Lecturer at Massey University. Working on high performance computing and modelling.

Professional Interests: numerical analysis, modelling, computer vision, mathematical biology

답변 있음

Alternatives to Delaunay triangulation

As David Wilson suggested, use alphashape: U = csvread('Coords.txt'); shp = alphashape(U(:, 1), U(:, 2), U(:, 3)); plot(shp) ...

Alternatives to Delaunay triangulation

As David Wilson suggested, use alphashape: U = csvread('Coords.txt'); shp = alphashape(U(:, 1), U(:, 2), U(:, 3)); plot(shp) ...

약 1달 전 | 1

답변 있음

How to pass a method as a function handle

I think the issue is that to use the @ construction, the thing you're applying it to needs to be named function in scope. There ...

How to pass a method as a function handle

I think the issue is that to use the @ construction, the thing you're applying it to needs to be named function in scope. There ...

약 1달 전 | 0

| 수락됨

답변 있음

Singular Matrices: Is the Matlab algorithm for CONDITON NUMBER always stable ?

The algorithm for condition number uses the SVD, not LU factorisation and is perfectly stable.

Singular Matrices: Is the Matlab algorithm for CONDITON NUMBER always stable ?

The algorithm for condition number uses the SVD, not LU factorisation and is perfectly stable.

약 1달 전 | 1

답변 있음

3D Measurementm using matlab

You could try the computer vision toolbox, which has an interface to OpenCV I believe. Writing the whole thing from scratch is...

3D Measurementm using matlab

You could try the computer vision toolbox, which has an interface to OpenCV I believe. Writing the whole thing from scratch is...

약 1달 전 | 0

답변 있음

Taking Mean Of Specific Rows and Columns Within A Loop

You don't need a loop. Basic idea: extract column 2. Reshape it into a matrix with columns 1200 tall take the mean of each co...

Taking Mean Of Specific Rows and Columns Within A Loop

You don't need a loop. Basic idea: extract column 2. Reshape it into a matrix with columns 1200 tall take the mean of each co...

약 1달 전 | 0

| 수락됨

답변 있음

Need to solve the differential equation for beam deflection and get the following plot

I think the problem you're having is not fully figuring out your solution before diving in and coding it. You have a differentia...

Need to solve the differential equation for beam deflection and get the following plot

I think the problem you're having is not fully figuring out your solution before diving in and coding it. You have a differentia...

약 1달 전 | 2

| 수락됨

답변 있음

How to go around infinite recursions

I'm not sure the code you've written describes what you intend. It's going to create an unterminated recursion that will cause a...

How to go around infinite recursions

I'm not sure the code you've written describes what you intend. It's going to create an unterminated recursion that will cause a...

약 1달 전 | 0

답변 있음

need help with basic speed time graph plot

Your function needs to have elementwise powers, i.e. use .^ instead of ^ It's trying to do matrix powers of the vector of time ...

need help with basic speed time graph plot

Your function needs to have elementwise powers, i.e. use .^ instead of ^ It's trying to do matrix powers of the vector of time ...

약 1달 전 | 1

| 수락됨

답변 있음

Random sampling of elements from an array based on a target condition in MATLAB

If your process is just to sample until you are within a tolerance of V_1 and you want things to be truly random, how about the ...

Random sampling of elements from an array based on a target condition in MATLAB

If your process is just to sample until you are within a tolerance of V_1 and you want things to be truly random, how about the ...

약 1달 전 | 1

| 수락됨

답변 있음

For a class object with a property that is an array of class objects, how to find the element in that array with highest property value

Your obj.population.fitness line returns comma separated values, not an array. So just enclose it in brackets: [M, I] = max(...

For a class object with a property that is an array of class objects, how to find the element in that array with highest property value

Your obj.population.fitness line returns comma separated values, not an array. So just enclose it in brackets: [M, I] = max(...

약 1달 전 | 0

| 수락됨

답변 있음

Non Zero element appear first with keeping the same size of the matrix?

here's a really naive way to do it: [m, n] = size(A); for i = 1:m k = find(A(i, :)) A(i, :) = [A(i, k), zeros(1, n -...

Non Zero element appear first with keeping the same size of the matrix?

here's a really naive way to do it: [m, n] = size(A); for i = 1:m k = find(A(i, :)) A(i, :) = [A(i, k), zeros(1, n -...

약 1달 전 | 1

제출됨

fitellipse.m

Fit ellipses to 2D points using linear or nonlinear least squares

4년 이하 전 | 다운로드 수: 40 |

답변 있음

How to create a sparse matrix with such specifications?

*edit* This version is wrong, but leaving so comment below makes sense density = 0.01; % For example m = 10000; n = 1000...

How to create a sparse matrix with such specifications?

*edit* This version is wrong, but leaving so comment below makes sense density = 0.01; % For example m = 10000; n = 1000...

6년 이상 전 | 0

답변 있음

count groups of elements and distances between them

A = [6 6 6 4 4 4 4 4 6 5 5 7 7 7 8 9 8 7 0 0 0 0]; x = diff([find(diff([0 ismember(A, [0 6]) 0]))]); L = x(1:2:end); ...

count groups of elements and distances between them

A = [6 6 6 4 4 4 4 4 6 5 5 7 7 7 8 9 8 7 0 0 0 0]; x = diff([find(diff([0 ismember(A, [0 6]) 0]))]); L = x(1:2:end); ...

6년 이상 전 | 2

답변 있음

Positive Semi-definite Matrix Problem

You're just going to have to live with it. Your matrix is PSD to double precision. If you look at the magnitude of the "zero" ei...

Positive Semi-definite Matrix Problem

You're just going to have to live with it. Your matrix is PSD to double precision. If you look at the magnitude of the "zero" ei...

6년 이상 전 | 1

답변 있음

vectorizing calculation of eigen values of a large multi-dimensional array

You'll get a bit of a performance boost simply by looping over linear indices rather than nesting (this is more than twice as fa...

vectorizing calculation of eigen values of a large multi-dimensional array

You'll get a bit of a performance boost simply by looping over linear indices rather than nesting (this is more than twice as fa...

6년 이상 전 | 0

답변 있음

Reduced row echelon form technique

It'll be a difference between yours and MATLAB's choice of tolerance. Your matrix should be rank 2, however I notice that MATLAB...

Reduced row echelon form technique

It'll be a difference between yours and MATLAB's choice of tolerance. Your matrix should be rank 2, however I notice that MATLAB...

6년 이상 전 | 0

| 수락됨

답변 있음

Evaluation of matrix element of a linear differential matrix equation by constrained least square fitting

Assuming you have multiple |X| and |X'| vectors that you're trying to fit your matrix to, your problem can be posed as a constra...

Evaluation of matrix element of a linear differential matrix equation by constrained least square fitting

Assuming you have multiple |X| and |X'| vectors that you're trying to fit your matrix to, your problem can be posed as a constra...

6년 이상 전 | 0

| 수락됨

답변 있음

displaying indexed values correctly

Similar to what you asked before, I think what you want is to find the |Vb| element that is closest to half of |Vb_ev|, and then...

displaying indexed values correctly

Similar to what you asked before, I think what you want is to find the |Vb| element that is closest to half of |Vb_ev|, and then...

6년 이상 전 | 0

| 수락됨

답변 있음

finding closest values in array

If I understand correctly, you want to find the |pH| value in your array closest to 4.756, and pull this value out, together wit...

finding closest values in array

If I understand correctly, you want to find the |pH| value in your array closest to 4.756, and pull this value out, together wit...

6년 이상 전 | 5

| 수락됨

답변 있음

How can I create sparse symmetric positive definite linear system?

|sprandsym| is what you want. m = 50; density = 2/m; % for example rc = 0.1; % Reciprocal condition number A = spr...

How can I create sparse symmetric positive definite linear system?

|sprandsym| is what you want. m = 50; density = 2/m; % for example rc = 0.1; % Reciprocal condition number A = spr...

6년 이상 전 | 1

| 수락됨

답변 있음

Sign differences in QR decomposition

It's only unique up to the signs of the rows of |R|. If you want to enforce positive diagonals of |R|, and thereby get a unique ...

Sign differences in QR decomposition

It's only unique up to the signs of the rows of |R|. If you want to enforce positive diagonals of |R|, and thereby get a unique ...

6년 이상 전 | 1

| 수락됨

답변 있음

Output argument "Clus_Area" (and maybe others) not assigned during call to

Check that the line if AR > 0 is doing what you intend. This will only evaluate if all entries of |AR| are positive. T...

Output argument "Clus_Area" (and maybe others) not assigned during call to

Check that the line if AR > 0 is doing what you intend. This will only evaluate if all entries of |AR| are positive. T...

6년 이상 전 | 0

답변 있음

How to use variable value as an input to the function?

You can very probably get away with just passing |template1| and |template2| themselves (not trying to create references to them...

How to use variable value as an input to the function?

You can very probably get away with just passing |template1| and |template2| themselves (not trying to create references to them...

6년 이상 전 | 0

답변 있음

Why I'm keep getting these errors? Please help!

The error message says it all. You're only computing one derivative in |my_function|. You need to define |ys(1)| and |ys(2)|...

Why I'm keep getting these errors? Please help!

The error message says it all. You're only computing one derivative in |my_function|. You need to define |ys(1)| and |ys(2)|...

6년 이상 전 | 1

답변 있음

How do I efficiently calculate a scalar distance with 3d geometry?

You should use |hypot|. It also has better numerical stability. *edit* sorry, you're in 3D. That obviously won't work. You c...

How do I efficiently calculate a scalar distance with 3d geometry?

You should use |hypot|. It also has better numerical stability. *edit* sorry, you're in 3D. That obviously won't work. You c...

6년 이상 전 | 0

답변 있음

Generating a particular sequnce of numbers

Also comparable, but not (quite) faster n = 1:(d*(d+1)/2); a = ceil(0.5*(-1 + sqrt(1 + 8*n))); out = a.*(a + 1)/2 - n...

Generating a particular sequnce of numbers

Also comparable, but not (quite) faster n = 1:(d*(d+1)/2); a = ceil(0.5*(-1 + sqrt(1 + 8*n))); out = a.*(a + 1)/2 - n...

6년 이상 전 | 2

답변 있음

Generating a particular sequnce of numbers

Even faster: k = 1; n = d*(d+1)/2; out = zeros(n, 1); for i = 1:d for j = i:-1:1 out(k) = j;...

Generating a particular sequnce of numbers

Even faster: k = 1; n = d*(d+1)/2; out = zeros(n, 1); for i = 1:d for j = i:-1:1 out(k) = j;...

6년 이상 전 | 2

답변 있음

please help with logical operators

replace all instances of |lenght| with |length|

please help with logical operators

replace all instances of |lenght| with |length|

6년 이상 전 | 0