주요 콘텐츠

geometryFromEdges

분해된 지오메트리 행렬에서 2차원 지오메트리 생성

설명

geometryFromEdges(model,g)g에 설명된 2차원 지오메트리를 model 컨테이너에 추가합니다.

예제

pg = geometryFromEdges(model,g)는 지오메트리를 작업 공간에 추가로 반환합니다.

예제

모두 축소

사각형을 나타내는 분해된 솔리드 지오메트리 모델을 만들고 이를 PDE 모델에 포함시킵니다.

디폴트 스칼라 PDE 모델을 만듭니다.

model = createpde;

사각형을 나타내는 지오메트리를 정의합니다.

R1 = [3,4,-1,1,1,-1,0.5,0.5,-0.75,-0.75]';

지오메트리를 최소 영역으로 분해합니다.

g = decsg(R1);

분해된 지오메트리 행렬에서 지오메트리를 만듭니다.

geometryFromEdges(model,g);

지오메트리를 플로팅합니다.

pdegplot(model,EdgeLabels="on")
axis equal
xlim([-1.1,1.1])
ylim([-0.9,0.6])

Figure contains an axes object. The axes object contains 5 objects of type line, text.

분해된 솔리드 지오메트리 모델을 생성하여 이를 PDE 모델에 포함시킵니다.

디폴트 스칼라 PDE 모델을 만듭니다.

model = createpde;

사각형 안에 원을 정의하고, 이들을 하나의 행렬에 넣고, 사각형에서 원을 빼는 집합 공식을 만듭니다.

R1 = [3,4,-1,1,1,-1,0.5,0.5,-0.75,-0.75]';
C1 = [1,0.5,-0.25,0.25]';
C1 = [C1;zeros(length(R1) - length(C1),1)];
gm = [R1,C1];
sf = 'R1-C1';

지오메트리를 만듭니다.

ns = char('R1','C1');
ns = ns';
g = decsg(gm,sf,ns);

지오메트리를 모델에 포함시키고 이를 플로팅합니다.

geometryFromEdges(model,g);
pdegplot(model,EdgeLabels="on")
axis equal
xlim([-1.1,1.1])

Figure contains an axes object. The axes object contains 9 objects of type line, text.

툴박스는 여러 지오메트리 함수를 제공합니다. 다음 함수 핸들을 사용하여 이를 지정합니다.

model = createpde;
g = geometryFromEdges(model,@cardg);
pdegplot(model)

Figure contains an axes object. The axes object contains an object of type line.

clear model
model = createpde;
g = geometryFromEdges(model,@circleg);
pdegplot(model)

Figure contains an axes object. The axes object contains an object of type line.

clear model
model = createpde;
g = geometryFromEdges(model,@cirsg);
pdegplot(model)

Figure contains an axes object. The axes object contains an object of type line.

clear model
model = createpde;
g = geometryFromEdges(model,@crackg);
pdegplot(model)

Figure contains an axes object. The axes object contains an object of type line.

clear model
model = createpde;
g = geometryFromEdges(model,@lshapeg);
pdegplot(model)

Figure contains an axes object. The axes object contains an object of type line.

clear model
model = createpde;
g = geometryFromEdges(model,@scatterg);
pdegplot(model)

Figure contains an axes object. The axes object contains an object of type line.

clear model
model = createpde;
g = geometryFromEdges(model,@squareg);
pdegplot(model)

Figure contains an axes object. The axes object contains an object of type line.

입력 인수

모두 축소

모델 컨테이너로, PDEModel 객체로 지정됩니다.

예: model = createpde(3)

지오메트리 설명으로, 분해된 지오메트리 행렬, 지오메트리 함수의 이름 또는 지오메트리 함수에 대한 핸들로 지정됩니다. 분해된 지오메트리 행렬에 대한 자세한 내용은 decsg 항목을 참조하십시오.

지오메트리 함수는 모든 함수 호출에서 동일한 입력 인수에 대해 동일한 결과를 반환해야 합니다. 따라서 난수 생성기와 같이 다양한 결과를 반환하도록 설계된 함수 및 표현식을 포함해서는 안 됩니다.

예: geometryFromEdges(model,@circleg)

데이터형: double | char | function_handle

출력 인수

모두 축소

지오메트리 객체로, AnalyticGeometry 객체로 반환됩니다. 이 객체는 model.Geometry에 저장됩니다.

버전 내역

R2015a에 개발됨

모두 확장