create time-changing graphic contour map
조회 수: 5 (최근 30일)
이전 댓글 표시
Update-
Maybe to clarify my end result- I have a sample dataset as below- first column denotes the x position, second denotes y position, and third column is the temperature value recorded. (That is why the x and y position number isn't changing)
The row is with respect to time from t=1-3s.
5 5 10
5 5 20
5 5 30
10 10 30
10 10 50
10 10 1
15 15 4
15 15 10
15 15 20
I was hoping to output a 3d surface graph like shown below
So x y coordinates will show, and z will be the temperature. I was hoping to generate an animation that will show the changes in temperature on these respective locations.
Any clarifications and/or advice will be greatly appreciated. Thanks.
previous post------------------------------------------------------------------
Hi, I have a time-resultant 100 point sensor output of temperature at 4 different places in a device. I want to see a graphical contour map so that I can a color based change for each point as time passes, preferably from blue (cold) to red (hot). Research in to past threads and online showed that maybe using surf() and/or pcolor() functions will do it. However, when I try to use the data I have, it gives me an error.
What I tried so far is to assign a 2x2x100 array to each point. What I want to do is also assign each of them to a graphical coordinate indicating the points at where I installed this sensor.
thanks for the help in advance
.
댓글 수: 0
답변 (2개)
Mischa Kim
2015년 6월 3일
Samuel, use something like
[X,Y,Z] = peaks(50);
figure
h = surf(X,Y,Z);
axis manual
for ii = 0:200
h.ZData = Z + rand(size(Z)); % replace by sensor data
pause(0.1)
end
댓글 수: 2
Mischa Kim
2015년 6월 3일
[X,Y,Z] = peaks(50);
figure
h = surf(X,Y,Z); % plot the first set of data
axis manual % this way the scales do not change
for ii = 0:200 % now animate; use 200 (random, correct)...
% ...time steps or data sets
h.ZData = Z + rand(size(Z)); % replace by sensor data
pause(0.1) % nope. to slow it down. you loop through...
% ...draw > pause > draw > pause etc.
end
As for the warning, did the code still work? If not, attach to your comment your x-, y-, and z-data as a .mat file and we can figure this one out as well.
Nelson Ojeda Quiles
2016년 4월 28일
I am trying to do the same, but with a 9 sensor setup. I just have Temperature/ Time(minutes)/ Sensor location, this code just makes my plot flicker. Should I change something?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!