Answered

legend children empty, but need to set transparency

I had the same problem. I couldn't figure out a way to resolve it in Matlab, so instead I exported the graph as it was and then ...

legend children empty, but need to set transparency

I had the same problem. I couldn't figure out a way to resolve it in Matlab, so instead I exported the graph as it was and then ...

1 year ago | 0

Answered

Integration of discrete data which have a non-linear relationship

Numerical integration based on Simpson's rule provides greater accuracy than integration using trapezoidal rule. Here is an impl...

Integration of discrete data which have a non-linear relationship

Numerical integration based on Simpson's rule provides greater accuracy than integration using trapezoidal rule. Here is an impl...

1 year ago | 0

| accepted

Answered

Contour plot with 3 variables

% Grid y=70:160; x=0:60; z=10:80; [X,Y,Z]=meshgrid(x,y,z); % Evaluate function at grid points F=-1.69*X ...

Contour plot with 3 variables

% Grid y=70:160; x=0:60; z=10:80; [X,Y,Z]=meshgrid(x,y,z); % Evaluate function at grid points F=-1.69*X ...

1 year ago | 0

Answered

Complex numbers input in neural networks

You can represent a complex number, a+i*b, as a 2-vector [a b], so use that format instead. Suppose that F is an array of comple...

Complex numbers input in neural networks

You can represent a complex number, a+i*b, as a 2-vector [a b], so use that format instead. Suppose that F is an array of comple...

1 year ago | 1

| accepted

Answered

How can I place spheres along a circle/ring ?

See example below. All relevant functions used to generate this example can be found <https://drive.google.com/open?id=11Rc5WKrq...

How can I place spheres along a circle/ring ?

See example below. All relevant functions used to generate this example can be found <https://drive.google.com/open?id=11Rc5WKrq...

1 year ago | 1

| accepted

Answered

Is it possible to plot Surfaces at specified coordinates?

If in addition to the vertices sampled from the surfaces you also have the connectivity information among the vertices, you can ...

Is it possible to plot Surfaces at specified coordinates?

If in addition to the vertices sampled from the surfaces you also have the connectivity information among the vertices, you can ...

1 year ago | 0

Answered

How to plot a function on a cylinder surface

Here is an example: % Right cylinder parameters z_min=0; % lower cut-off point z_max=4; % upper cut-off point ...

How to plot a function on a cylinder surface

Here is an example: % Right cylinder parameters z_min=0; % lower cut-off point z_max=4; % upper cut-off point ...

1 year ago | 1

| accepted

Answered

Is it posible in Matlab to model surface using spherical harmonics (SH) basing on 3d data? If yes, how can I do it.

If the surface in question is closed (i.e., no boundaries) and is genus-0 (i.e., ho holes or handles), then it is indeed possibl...

Is it posible in Matlab to model surface using spherical harmonics (SH) basing on 3d data? If yes, how can I do it.

If the surface in question is closed (i.e., no boundaries) and is genus-0 (i.e., ho holes or handles), then it is indeed possibl...

1 year ago | 0

| accepted

Answered

solving system of equations using singular value decomposition and fsolve

This is an overdetermined system (i.e., number of equations > number of variables). You can obtain least squares solution as X=(...

solving system of equations using singular value decomposition and fsolve

This is an overdetermined system (i.e., number of equations > number of variables). You can obtain least squares solution as X=(...

1 year ago | 1

Answered

How do I display 55x305x4 .mat file as an image in Matlab and save it ?

% Data array A=Position3DGrid; % Convert to uint8 I_min=min(A(:)); I_max=max(A(:)); A=uint8(255*(A-I_min)/(...

How do I display 55x305x4 .mat file as an image in Matlab and save it ?

% Data array A=Position3DGrid; % Convert to uint8 I_min=min(A(:)); I_max=max(A(:)); A=uint8(255*(A-I_min)/(...

1 year ago | 0

Answered

From .stl to mathematical function. Is it possible?

If the object is has a relatively simple geometry and you want to get a compact description of its shape, one of the following r...

From .stl to mathematical function. Is it possible?

If the object is has a relatively simple geometry and you want to get a compact description of its shape, one of the following r...

1 year ago | 1

| accepted

Answered

How can I accurately plot the centroid of black dots in MATLAB?

% Get the image im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/120388/MATLAB_QUESTION.PNG'); ...

How can I accurately plot the centroid of black dots in MATLAB?

% Get the image im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/120388/MATLAB_QUESTION.PNG'); ...

1 year ago | 0

| accepted

Answered

Finding the part of a larger matrix that is most similar to a smaller matrix

Here is another example, in case you dont have an Image Processing Toolbox: % Random N-by-N matrix N=1E3; % ma...

Finding the part of a larger matrix that is most similar to a smaller matrix

Here is another example, in case you dont have an Image Processing Toolbox: % Random N-by-N matrix N=1E3; % ma...

1 year ago | 0

Answered

open an image in another image

Here is an example: im1=imread('peppers.png'); im2=imread('football.jpg'); im3=im1; im3(1:size(im2,1),1:si...

open an image in another image

Here is an example: im1=imread('peppers.png'); im2=imread('football.jpg'); im3=im1; im3(1:size(im2,1),1:si...

1 year ago | 0

| accepted

Answered

How to hightlight the mask in a image

Here you go: im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/119871/test1.png'); % grayscale ...

How to hightlight the mask in a image

Here you go: im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/119871/test1.png'); % grayscale ...

1 year ago | 0

Answered

Converting a stack of .bmp images into an .stl file

(1) Segment the object of interest in your 3D image, (2) Reconstruct boundary of the segmented object using 'isosurface' func...

Converting a stack of .bmp images into an .stl file

(1) Segment the object of interest in your 3D image, (2) Reconstruct boundary of the segmented object using 'isosurface' func...

1 year ago | 0

Answered

could anyone tell me how to save the values while the code is getting executed

save('FileName.m','name_of_variable_you_want_to_save')

could anyone tell me how to save the values while the code is getting executed

save('FileName.m','name_of_variable_you_want_to_save')

1 year ago | 0

Answered

How i can convert cell (each element in cell with different length) to array?

Is this kind of what you are looking for? ex = {[1,2,4,5,7,11,12],[1,3,4,5,7,11,12],[1,2,4,6,5,7,11,12],[1,3,4,6,5,7,11,12]...

How i can convert cell (each element in cell with different length) to array?

Is this kind of what you are looking for? ex = {[1,2,4,5,7,11,12],[1,3,4,5,7,11,12],[1,2,4,6,5,7,11,12],[1,3,4,6,5,7,11,12]...

1 year ago | 0

| accepted

Answered

how to find maximum value in a matrix?

Demo of local search based on 4-connected neighbourhood: <</matlabcentral/answers/uploaded_files/119785/conn_4.jpg>> Demo ...

how to find maximum value in a matrix?

Demo of local search based on 4-connected neighbourhood: <</matlabcentral/answers/uploaded_files/119785/conn_4.jpg>> Demo ...

1 year ago | 1

| accepted

Answered

Filter with variable span

Here is an example of a Laplacian filtering function I just put together: N=5E3; % ...

Filter with variable span

Here is an example of a Laplacian filtering function I just put together: N=5E3; % ...

1 year ago | 0

Answered

How to divide the brain segmented slices in left and right compartments (halves)?

The simplest way to approach your problem is to (1) Aggregate all (segmented) slices from a given 3D image to form a volume ...

How to divide the brain segmented slices in left and right compartments (halves)?

The simplest way to approach your problem is to (1) Aggregate all (segmented) slices from a given 3D image to form a volume ...

1 year ago | 0

Answered

3D array permutation

Suppose you have G, which is a Y-by-X-by-Z 3D array, then i-th xy slice: G_yx=G(:,:,i); % Y-by-X array i-th xz slice...

3D array permutation

Suppose you have G, which is a Y-by-X-by-Z 3D array, then i-th xy slice: G_yx=G(:,:,i); % Y-by-X array i-th xz slice...

1 year ago | 0

Answered

need help for touched cursive segmentation

You have to apply watershed algorithm to the original (grayscale) image, not the binary one. Can you post the code you are using...

need help for touched cursive segmentation

You have to apply watershed algorithm to the original (grayscale) image, not the binary one. Can you post the code you are using...

1 year ago | 1

| accepted

Answered

How to find and draw boundary on some parts of an object in image?

Is this what you are looking for? im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/119409/Imag...

How to find and draw boundary on some parts of an object in image?

Is this what you are looking for? im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/119409/Imag...

1 year ago | 0

Answered

Detecting centroid and orientation of capsules

If your capsules have parametric a representation (e.g., ellipsoid), you can use Hough transform (HG). Description of a HG varia...

Detecting centroid and orientation of capsules

If your capsules have parametric a representation (e.g., ellipsoid), you can use Hough transform (HG). Description of a HG varia...

1 year ago | 1

Answered

Filter with variable span

Simplest solution would be to resample your signal on a uniformly-spaced grid using linear interpolation (see 'interp1' function...

Filter with variable span

Simplest solution would be to resample your signal on a uniformly-spaced grid using linear interpolation (see 'interp1' function...

1 year ago | 0

Question

Setting 'FaceAlpha'<1 for a patch object causes x- and y- axes of the plot to dissapear. Why and how can this be corrected?

Hello everyone, have any of you ever plotted a 2D patch object and noticed that upon altering its 'FaceAlpha' value below 1, ...

5 years ago | 1 answer | 0

Answered

Dividing a triangle into equal parts

Suppose you have a triangle defined by the vertices A, B and C. To subdivide this triangle into n triangles of equal area you ca...

Dividing a triangle into equal parts

Suppose you have a triangle defined by the vertices A, B and C. To subdivide this triangle into n triangles of equal area you ca...

7 years ago | 0

Answered

Point inside triangle(s)?

Hi Sven, I have encountered this problem many times in the past. I am aware of at least two approaches to solve it. The first...

Point inside triangle(s)?

Hi Sven, I have encountered this problem many times in the past. I am aware of at least two approaches to solve it. The first...

7 years ago | 1