Plotting 4D function

조회 수: 6 (최근 30일)
raha ahmadi
raha ahmadi 2021년 8월 23일
댓글: raha ahmadi 2021년 8월 23일
Hi, I exported temperature vs cordinates(x,y,z) from COMSOL. I dont want to use LiveLink. I was wondering is there any method to plot this 4D data? I read the other pages about 4D visualisaton and try surf3 and scatter3 but I couldnt reach this picture.(This picture has been plotted by COMSOL ) . I attached the data and the picture.
I really appreciate any help

채택된 답변

Wan Ji
Wan Ji 2021년 8월 23일
In the finite element analysis, you have the coordinates of nodes and elements for node order. Also, to each node, the attached field variables such as displacement, temperature, velocity, moisture, electric intensity and so forth are the 4th dimension to be expressed by colors. It is convenient to use patch for depicting field variables.
For example,
gm = multicuboid(2,1,1);
model = createpde;
model.Geometry = gm;
msh = generateMesh(model,'GeometricOrder','quadratic','hmax',0.2);
element = msh.Elements';
element = element(:,[1,5,2,9,4,8, 2,6,3,10,4,9, 1,7,3,6,2,5, 1,8,4,10,3,7])';
element = reshape(element, 6, numel(element)/6)';
node = msh.Nodes';
patch('vertices', node, 'faces', element, 'facevertexcdata', ...
node(:,3), 'facecolor', 'interp','facealpha',1); % node(:,3) as color map data
colormap(hsv)
colorbar
axis equal
axis off
view(45,67)
If you are interested in postprocessing, you can see some of my exchange file:
femPatch or solidPath are for postprocessing
  댓글 수: 1
raha ahmadi
raha ahmadi 2021년 8월 23일
Dear Wan Ji
very thanks for your help. It's very helpful. also thanks for introducing your files.
I hope you the best

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by