Question

rotation meshgrid surface with the predefined angel(using rotation matrix)

Let's say: x=1:0.2:1.8= [1 1.2 1.4 1.6 1.8]; y=2:0.2:3 = [2 2.2 2.4 2.6 2.8 3]; z=[2 5 2 2 2; 2.1 2.1 2.1 2...

1 year ago | 2 answers | 0

Question

plot 3D point data

I have matrix A=[x y z] with 2112 point data . Please see attachment file, and figure: How can I plot the surface using tha...

1 year ago | 1 answer | 0

Question

assign the same vector to be the same cell

Let's say, I have the matrix: A=[x,y]=[1 2;1.1 2;1.2 2;1 3;1.1 3;1.2 3;1 4;1.1 4;1.2 4]; If i wanna group all vector havin...

1 year ago | 3 answers | 0

Question

Integrating C++ Code in MATLAB

How can I integrate C++ in Matlab? Let's say, I wanna run the example "fdbscan_example.m" in Matlab. But, I need to Call the ...

1 year ago | 0 answers | 0

Question

legend for circle matlab

<</matlabcentral/answers/uploaded_files/137333/untitled.jpg>> How can i add the legend for "red circle" in the image? The ci...

1 year ago | 2 answers | 0

Question

the temporary variable uses a value set outside of the PARFOR loop

Let' say I have the code like this: gcp; a=zeros(1,3);%create the zeros matric 1x3 my_cell={[1 1 1;2 2 2],[3 3 3;4 4 ...

1 year ago | 1 answer | 0

Answered

check condition if array A contain array B or not

*THE ANSWER IS(this below code(20s) is faster than use ismember(43s)):* clear;clc; A = [randperm(1e9,1e8)]';%generate 10...

check condition if array A contain array B or not

*THE ANSWER IS(this below code(20s) is faster than use ismember(43s)):* clear;clc; A = [randperm(1e9,1e8)]';%generate 10...

1 year ago | 1

| accepted

Answered

write double class to .txt file

dlmwrite('output.txt', ha, 'delimiter','\t','newline','pc','precision',13); where "precision": using a precision of 13 ...

write double class to .txt file

dlmwrite('output.txt', ha, 'delimiter','\t','newline','pc','precision',13); where "precision": using a precision of 13 ...

2 years ago | 0

| accepted

Question

write double class to .txt file

Let' say , I have the data in Matlab with the result is ha=14x3 double. <</matlabcentral/answers/uploaded_files/122175/Captur...

2 years ago | 2 answers | 0

Answered

find the intersection point between 2 plane in matlab

Plane L contains 10,000 points in 3D space OXYZ Plane M contains (normal_vector & center_point). Firstly, finding the perpe...

find the intersection point between 2 plane in matlab

Plane L contains 10,000 points in 3D space OXYZ Plane M contains (normal_vector & center_point). Firstly, finding the perpe...

2 years ago | 0

| accepted

Question

find the intersection point between 2 plane in matlab

Let's say I have: the set of 3D data point (xi,yi,zi) contains around 10,000 points located in plane L I also have : plane M ...

2 years ago | 2 answers | 0

Answered

rotation matrix 3D point data

*FINAL ANSWER:* %% Load input 3D data clear;clc;filename = 'test.txt'; inputfile = importfile(filename); P = inputfil...

rotation matrix 3D point data

*FINAL ANSWER:* %% Load input 3D data clear;clc;filename = 'test.txt'; inputfile = importfile(filename); P = inputfil...

2 years ago | 0

| accepted

Question

Fitting a plane through a 3D point data

For example, i have 3d point cloud data [xi, yi, zi] as the attachment .txt file. I want to fit a plane to a set of 3D point da...

2 years ago | 3 answers | 0

Question

divide the rectangle into the strip in matlab

Let' say I have the matrix P contain 2D point data(20 points): 1 2 1.5 2 2 2 2.5 2 3 2 3.5 2 4 2 ...

2 years ago | 0 answers | 0

Question

distance from point to plane (plane was created from 3d point data)

Let's say : a plane N contain a set of 3d coordinate data (A). A=[x1 y1 z1 x2 y2 z2 x3 y3 z3 ........] ...

2 years ago | 1 answer | 0

Question

relationship between 2 matrix

A, B is matrix: A=[1;2;3;4;5;6;7;8;9]; B=[2;4;7;9]; How to find matrix C as follow? C=[1;[];3;[];5;6;[];8;[]];...

2 years ago | 2 answers | 0

Question

YTickLabel in colormap will be shown with some specified value (not show all)

I have code and the result as below: %% How to plot each matrix in a cell in 3d plot(1 matrix with 1 color) ? % Generate...

2 years ago | 1 answer | 0

Answered

YTickLabel in colormap will be shown with some specified value (not show all)

Additional code: cb = colorbar('YTick',[1:numcolors],'YTickLabel', num2str([1:numcolors]'), 'YLim', [1 numcolors]); ti...

YTickLabel in colormap will be shown with some specified value (not show all)

Additional code: cb = colorbar('YTick',[1:numcolors],'YTickLabel', num2str([1:numcolors]'), 'YLim', [1 numcolors]); ti...

2 years ago | 0

| accepted

Question

change the structure of cell

A : 3x1 cell class A={cell_1; cell_2; cell_3;} A={[3x1 double];[5x1 double];[1x1 double]} ...

2 years ago | 1 answer | 0

Question

divide matrix to be sub-matrix

A is matrix: A=[111;222;333;444;555;666;777;888;999;1000;2000]; %total number of A is 11 I wanna divide matrix A to be "...

2 years ago | 1 answer | 0

Answered

plot 3d set of data(x,y,z) colored by the z coordinate

You can test with the input data "Book1.txt" (~900points) scatter3(P(:,1),P(:,2),P(:,3),9,P(:,3),'.'); %9 is the size of ...

plot 3d set of data(x,y,z) colored by the z coordinate

You can test with the input data "Book1.txt" (~900points) scatter3(P(:,1),P(:,2),P(:,3),9,P(:,3),'.'); %9 is the size of ...

2 years ago | 1

| accepted

Question

check condition if array A contain array B or not

Example, I have: A = [randperm(1e9,1e8)]';% array A contain 100,000,000 element B = [randperm(1e5,1e4)]';% array B conta...

2 years ago | 3 answers | 0

Question

How to call index of vector from matrix?

Hello, I have: n-by-3 matrix A, where xi,yi,zi are non-integer(e.g., x=-1.23;y=2.45;z=123.11): A contain 10million el...

2 years ago | 1 answer | 0

Answered

call vector in matrix with condition?

A(ismember(A(:,2:4),B,'rows'),1);

call vector in matrix with condition?

A(ismember(A(:,2:4),B,'rows'),1);

2 years ago | 0

| accepted

Question

call vector in matrix with condition?

Let's say: A=[1 2 3 10;4 5 6 15;7 8 9 20] A= 1 2 3 10 4 5 6 15 7 8 9 ...

2 years ago | 1 answer | 0

Answered

delete row in matrix if the row contain "Inf" value

Thank @Stephen Cobeldick A(any(isinf(A),2),:) = []

delete row in matrix if the row contain "Inf" value

Thank @Stephen Cobeldick A(any(isinf(A),2),:) = []

2 years ago | 0

| accepted

Question

delete value from double class by using logical class

Let's say: A : 2x7 double class A=[ 1 2 3 4 5 6 7; 8 9 1 2 3 4 5] ; A=[ 1 2 3 4 5 6 7 8 9 1 2 3 4 5 ] B: ...

2 years ago | 2 answers | 0

Question

check the index of cell which were removed

Let's say: A : 4x1 cell class A={cell_1 ;cell_2 ; cell_3 ;cell_4 } A={ [] ;[999,222];[444,222,2000]; ...

2 years ago | 1 answer | 0

Question

find bandwidth of Kernel Density Estimator

I'm doing kernel density estimator of the set of 1d data by using the blow code: clear;clc;data=[randn(100,1)-10;randn(100...

2 years ago | 1 answer | 0