Answered

How do you generate a Cumulative Histogram on R2014a?

Here is an example of how to use 'histcounts' and estimate percentiles: % Simulate data; N samples from standard Guassian P...

How do you generate a Cumulative Histogram on R2014a?

Here is an example of how to use 'histcounts' and estimate percentiles: % Simulate data; N samples from standard Guassian P...

mer än 3 år ago | 0

Answered

I want to plot a numerical integral in a mesh which is dependent of x and y. How can I do this?

The integrals in your equation can be evaluated analytically. Here how you can visualize C(z1,z2) and C(z1,z1): L = 20...

I want to plot a numerical integral in a mesh which is dependent of x and y. How can I do this?

The integrals in your equation can be evaluated analytically. Here how you can visualize C(z1,z2) and C(z1,z1): L = 20...

mer än 3 år ago | 0

Answered

Interpolating scattered 3 dimensional data

Hi, Markus, here is a demo of how to perform linear interpolation of vector fields on a unit half-sphere: half_sphere_inter...

Interpolating scattered 3 dimensional data

Hi, Markus, here is a demo of how to perform linear interpolation of vector fields on a unit half-sphere: half_sphere_inter...

mer än 3 år ago | 1

Answered

Taylor expansion with 2 variables

Taylor's theorem generalizes to multivariate functions. Formula for third order approximation of a bivariate function can be fou...

Taylor expansion with 2 variables

Taylor's theorem generalizes to multivariate functions. Formula for third order approximation of a bivariate function can be fou...

mer än 3 år ago | 0

Answered

Troubleshooting Isosurface Rendering Code

Make sure that your 'Image' variable is cast as a double and actually has a zero level-set. Here is an example: % Samp...

Troubleshooting Isosurface Rendering Code

Make sure that your 'Image' variable is cast as a double and actually has a zero level-set. Here is an example: % Samp...

mer än 3 år ago | 0

Answered

How to find distance between two nodes? including the nodes.

Download <https://www.mathworks.com/matlabcentral/fileexchange/5355-toolbox-graph graph processing toolbox> from FEX. Use Dijks...

How to find distance between two nodes? including the nodes.

Download <https://www.mathworks.com/matlabcentral/fileexchange/5355-toolbox-graph graph processing toolbox> from FEX. Use Dijks...

mer än 3 år ago | 0

Answered

how to deal with large polygons ?

Check out 'DecimatePoly' function on FEX: <https://www.mathworks.com/matlabcentral/fileexchange/34639-decimate-polygon> Inclu...

how to deal with large polygons ?

Check out 'DecimatePoly' function on FEX: <https://www.mathworks.com/matlabcentral/fileexchange/34639-decimate-polygon> Inclu...

mer än 3 år ago | 1

Answered

Detection of line segments and length

It doesn't look very clear to me, and is maybe the reason why the Hough transform isn't generating the output you want. For exam...

Detection of line segments and length

It doesn't look very clear to me, and is maybe the reason why the Hough transform isn't generating the output you want. For exam...

mer än 3 år ago | 0

| accepted

Answered

Can I recover only the diagonal elements of A' * B with SVD vectors of A and B?

i-th diagonal of A'*B equals dot product of the i-th columns of A and B. Here is a demo showing how to recover only the diagonal...

Can I recover only the diagonal elements of A' * B with SVD vectors of A and B?

i-th diagonal of A'*B equals dot product of the i-th columns of A and B. Here is a demo showing how to recover only the diagonal...

mer än 3 år ago | 0

Answered

How to have automated thresholding to deal with disparities between images

Here is a demo that uses automatic multi-level thresholding to isolate the disks: im_files={'https://www.mathworks.com/matl...

How to have automated thresholding to deal with disparities between images

Here is a demo that uses automatic multi-level thresholding to isolate the disks: im_files={'https://www.mathworks.com/matl...

mer än 3 år ago | 1

| accepted

Answered

Fit to the experimental plot

Use <https://www.mathworks.com/help/curvefit/fit.html 'fit'> function

Fit to the experimental plot

Use <https://www.mathworks.com/help/curvefit/fit.html 'fit'> function

mer än 3 år ago | 0

Answered

ray tracing, indices and path length registration

For 2D reconstruction, the problem can be approached follows: 1) Let's say you have a set of K rays {Rk}, where Rk is k-th r...

ray tracing, indices and path length registration

For 2D reconstruction, the problem can be approached follows: 1) Let's say you have a set of K rays {Rk}, where Rk is k-th r...

mer än 3 år ago | 0

| accepted

Answered

Chan Vese Segmentation mask is not working Properly

Your image appears to be "padded" on the top and bottom with gray values. The transition between the black background (containin...

Chan Vese Segmentation mask is not working Properly

Your image appears to be "padded" on the top and bottom with gray values. The transition between the black background (containin...

mer än 3 år ago | 0

| accepted

Answered

How to calculate trace(A' * B) using SVD vectors of A and B?

I am not aware of any identities that can express trace(A'*B) in terms of SVDs of A and B, and I dont think one exists, but ther...

How to calculate trace(A' * B) using SVD vectors of A and B?

I am not aware of any identities that can express trace(A'*B) in terms of SVDs of A and B, and I dont think one exists, but ther...

mer än 3 år ago | 2

| accepted

Answered

How to evaluate the angle from an image?

Try this: spray_angle_demo Output: Spray angle: 45.98 degrees <</matlabcentral/answers/uploaded_files/122840/spr...

How to evaluate the angle from an image?

Try this: spray_angle_demo Output: Spray angle: 45.98 degrees <</matlabcentral/answers/uploaded_files/122840/spr...

mer än 3 år ago | 0

| accepted

Answered

Does the pca function restrict the number of components to be kept?

The eigenvectors computed by PCA (and its generalized version called probabilistic PCA) only span the subspace of the ambient sp...

Does the pca function restrict the number of components to be kept?

The eigenvectors computed by PCA (and its generalized version called probabilistic PCA) only span the subspace of the ambient sp...

mer än 3 år ago | 3

| accepted

Answered

T-Test with covariates?

In medical image processing application <https://en.wikipedia.org/wiki/General_linear_model general linear model> is often used ...

T-Test with covariates?

In medical image processing application <https://en.wikipedia.org/wiki/General_linear_model general linear model> is often used ...

mer än 3 år ago | 0

Answered

How to calculate the moment of inertia of a convex hull?

Here is a link to a function on FEX that computes inertia tensors of objects represented by triangular surface meshes: https://w...

How to calculate the moment of inertia of a convex hull?

Here is a link to a function on FEX that computes inertia tensors of objects represented by triangular surface meshes: https://w...

mer än 3 år ago | 1

| accepted

Answered

Isolating specific dots in an image.

im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/122320/2steps%20from%20perfection.PNG'); im=max(i...

Isolating specific dots in an image.

im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/122320/2steps%20from%20perfection.PNG'); im=max(i...

mer än 3 år ago | 2

| accepted

Answered

How to measure the curvature of object boundary?

Thanks for the clarification. If I understand correctly, the features you seek should be extracted from an open-curve that repre...

How to measure the curvature of object boundary?

Thanks for the clarification. If I understand correctly, the features you seek should be extracted from an open-curve that repre...

mer än 3 år ago | 0

| accepted

Answered

How can I transform a coordinates data into another 3-D space?

Code below demonstrates how to obtain rotation matrices between corresponding 3-tupples of non-collinear points in 3-space: ...

How can I transform a coordinates data into another 3-D space?

Code below demonstrates how to obtain rotation matrices between corresponding 3-tupples of non-collinear points in 3-space: ...

mer än 3 år ago | 0

Answered

3D Coordinates Line of Fit

Hey, David. Here is a demo you may find useful: <</matlabcentral/answers/uploaded_files/122157/best_fit_demo.jpg>> funct...

3D Coordinates Line of Fit

Hey, David. Here is a demo you may find useful: <</matlabcentral/answers/uploaded_files/122157/best_fit_demo.jpg>> funct...

mer än 3 år ago | 2

| accepted

Answered

re. finding perimeter of a 2D shape

% Contour coordinates A=xlsread('Profgraph.xls','sheet2'); % Compute perimeter N=size(A,1); D=A(:,2:N)-A(:,1:(...

re. finding perimeter of a 2D shape

% Contour coordinates A=xlsread('Profgraph.xls','sheet2'); % Compute perimeter N=size(A,1); D=A(:,2:N)-A(:,1:(...

mer än 3 år ago | 0

| accepted

Answered

Fill area with random circles having different diameters

Hopefully this iteration of code (see below) is the last one. % Unconstrained circle packing example. Only centroids constr...

Fill area with random circles having different diameters

Hopefully this iteration of code (see below) is the last one. % Unconstrained circle packing example. Only centroids constr...

mer än 3 år ago | 0

| accepted

Answered

Fill area with random circles having different diameters

Here is another implementation of random circle packing. This version produces much tighter packing than my previous demo thanks...

Fill area with random circles having different diameters

Here is another implementation of random circle packing. This version produces much tighter packing than my previous demo thanks...

mer än 3 år ago | 0

Answered

Reparameterize 3D points with respect to PCA vector

Here is a quick demo: <</matlabcentral/answers/uploaded_files/121201/pca_normalization.jpg>> function pca_point_cloud_de...

Reparameterize 3D points with respect to PCA vector

Here is a quick demo: <</matlabcentral/answers/uploaded_files/121201/pca_normalization.jpg>> function pca_point_cloud_de...

mer än 3 år ago | 2

| accepted

Answered

Fill area with random circles having different diameters

Here is a demo that uses rejection sampling and Delaunay triangulation <</matlabcentral/answers/uploaded_files/121175/circle_...

Fill area with random circles having different diameters

Here is a demo that uses rejection sampling and Delaunay triangulation <</matlabcentral/answers/uploaded_files/121175/circle_...

mer än 3 år ago | 0

Answered

Custom Image Spatial Filtering Code using loops not giving the same result as using the built in imtransform() function

Actually, both your 'convolution' function and built-in 'imfilter' function produce very similar results. The discrepancy you we...

Custom Image Spatial Filtering Code using loops not giving the same result as using the built in imtransform() function

Actually, both your 'convolution' function and built-in 'imfilter' function produce very similar results. The discrepancy you we...

mer än 3 år ago | 1

| accepted

Answered

Write a script to calculate the sum of even numbers from between 1 to 1000

Here is the script sum(2:2:1000)

Write a script to calculate the sum of even numbers from between 1 to 1000

Here is the script sum(2:2:1000)

mer än 3 år ago | 0

Answered

Soften hard constraints in MPC formulated as a QP-problem

You could try using 'fmincon' instead of 'quadprog', which would allow you to incorporate non-linear constraints on your state v...

Soften hard constraints in MPC formulated as a QP-problem

You could try using 'fmincon' instead of 'quadprog', which would allow you to incorporate non-linear constraints on your state v...

mer än 3 år ago | 0