What is the best way to plot a 3D mesh using discrete point data contained in different matrices?
조회 수: 3 (최근 30일)
이전 댓글 표시
I’m trying to visualise the maximum out of plane displacement of a wall during a seismic test. Data was collected trough a series of optic markers.
What I have done so far:
I’ve built a 1X74 Cell in which every row represents a test run and contains a matrix made as follows:
Each row represents a optic marker and each column the coordinates of the marker in the deformed configuration (in x, y and z).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171342/image.png)
I want to plot a mesh for each test, representing the deformed shape of the wall using the data stored in those matrices.
(Something like this, for each test:)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171343/image.png)
Is there a way of doing so using that data structure or is it better to store the data in a different way?
I’m new to the use of meshes in Matlab so any sample of code or suggestion on the best strategy to use would be very much appreciated, Thank you!
댓글 수: 0
답변 (1개)
Venkata Siva Krishna Madala
2018년 3월 20일
Hello Manuel Desole,
I am assuming the name of your cell array to be "c". I have written code in such a way that the same mesh plot will be updates with a new test data every 2 seconds.
m=mesh(c{:,1});
pause(2);
for i=2:size(c,2)
set(m,'ZData',c{:,i});
pause(2);
end
Regards,
Krishna Madala
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!