Using XY Data from this example? Help please
조회 수: 2 (최근 30일)
이전 댓글 표시
What I mean is I am running the following example:
openExample('pde/StressConcentrationInPlateWithCircularHoleExample')
I'll keep it simple: can someone explain how I extract the XY Data?
I am trying to write a function that will receive an XY position to test, and return the relevant values at that position in the solution plot, such as for Von Mises stress at that XY position. However the model doesn't seem to have a readily available vector or matrix of corresponding XY values, and 'XYdata' looks like a special call to model, so not necessarily stored in the format useful to what I am doing.
"At [4.6783, 10.4534], what is the stress in the X-direction?" etc.
댓글 수: 0
채택된 답변
추가 답변 (1개)
Walter Roberson
2021년 5월 11일
After the call to
geometryFromEdges(model,g);
then
model.Geometry.Vertices
will give you the initial geometric coordinates as an 8 x 2 array.
After the call to
generateMesh(model,'Hmax',radius/6);
then
model.Mesh.Nodes
will be a 2 x 16048 array of coordinates, and
model.Mesh.Elements
will be a 6 x 7856 array of integers, minimum value 1 and maximum value 16048 -- so we can tell that those are indices into the model.Mesh.Nodes array.
댓글 수: 3
Walter Roberson
2021년 5월 11일
Ah, but what you asked for is to extract the XY Data. Ravi's solution is what you probably really want.
참고 항목
카테고리
Help Center 및 File Exchange에서 General PDEs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!