平面(ax+by+cz+d=0)への近似
이전 댓글 표시
3次元のランダムに散らばった点群データ(約1000点)から平面(ax+by+cz+d=0)への近似を行う方法を教えてください。
채택된 답변
추가 답변 (1개)
KSSV
2016년 12월 15일
clc; clear all ;
% Ax + By + Cz + D = 0
% where the coefficients "A", "B", "C", and "D" are known values.
A = rand ; B = rand ; C = rand ; D = rand ; % considering some random values
%%Method 1
x = [1 -1 -1 1]; % Generate data for x vertices
y = [1 1 -1 -1]; % Generate data for y vertices
z = -1/C*(A*x + B*y + D); % Solve for z vertices data
patch(x, y, z);
%%method 2
[x y] = meshgrid(-1:0.1:1); % Generate x and y data
z = -1/C*(A*x + B*y + D); % Solve for z data
surf(x,y,z) %Plot the surface
댓글 수: 2
Ichiro Suzuki
2016년 12월 15일
KSSV
2016년 12월 15일
You have to be bit clear about your question.What do you mean by approximate calculation?
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!