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!