Plotting speed data in 3D (Cube)

1 view (last 30 days)
Keith Hay
Keith Hay on 10 Aug 2022
Edited: Keith Hay on 10 Aug 2022
I've got data for the speed with which air flows through different locations in a box. I began by a simple code to graph speed as follows.
clc
clear all
D = readtable("CubePlot","VariableNamingRule","preserve");
Df = table2array(D);
for i=1:1:length(Df)
t=Df(i,1);
for j=2:5;
speed=Df(i,j);
plot(t,speed,'.')
drawnow
hold on
end
end
This plots all the air speeds at time t, followed by all the air speeds at time t+1 and so on. Ive got several hundreds of data points so instantaneous comparison with this graph is not reasonable.
How can I represent this data in a cube with different locations displaying their respective speeds with passing time?
  2 Comments
Keith Hay
Keith Hay on 10 Aug 2022
Edited: Keith Hay on 10 Aug 2022
My bad. I shouldve been more clear about what I meant with the cube.
Say I have an the xyz origin axis at the center of a cube such that it divides the cube into 8 different sections as below.
Say I want j = 2:5 in the front facing quadrant, one in the center of (-,-,+), one in the center of (+,-,+), one in the center of (-,-,-) and finally one in the center of (+,-,-). My previous code was graphing all these speeds at the same time. However, I want to change that to displaying the actual numbers in the desired location. As in when t=2, j is 0.46 m/s and that is displayed as a number, in the center of (-,-,+) and so forth.

Sign in to comment.

Answers (0)

Categories

Find more on Line Plots in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!