create time-changing graphic contour map
15 views (last 30 days)
Show older comments
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 Comments
Answers (2)
Mischa Kim
on 3 Jun 2015
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 Comments
Mischa Kim
on 3 Jun 2015
[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
on 28 Apr 2016
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 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!