Multiple 2D plots in 1 3D plot

7 次查看(过去 30 天)
I have 3 sets of data accross 3 days. In the y direction would be day 1, 2, 3. The x-direction has specific times t. while the Z direction is the intesitiy at time t. No equations just 3 sets of data with time t. See below for example of the data.
t is the time. BY is day 1's intensities, CY is day 2's intensities, and DY is day 3's intensities.
In the end I want the data to look like the example from orgin attached as a figure.
Thank you, I have tried many different things but cannot quite figure out how to get plot3 to work out.
t=[1
2
3
4
5
6
7
8
9];
BY = [4925
4564
4356
4245
3701
3662.5
3510.5
3520.5
3342];
CY = [4865.875
4657.5
4474
4221.5
4079.75
3907
3700.5
3579.25
3460.375];
DY = [421.125
416.625
446.25
423.875
429.25
398.75
379.875
374.5
357.25
340
343.25
338.625];
  2 个评论
madhan ravi
madhan ravi 2021-2-22
The time in the figure is between 20 to 40 but your data has 1 to 9?
Max Mortensen
Max Mortensen 2021-2-22
Yes, the origin plot is the orignal data and each day has more than 5000 points starting from minute 4 going all the way up to minute 60. The data I provided was a small portion with time t asigned as an arbitrary 1-9 but really it should be
t=[4
4.01
4.02
4.03
4.04
4.05
4.06
4.07
4.08];
sorry for the confusion

请先登录,再进行评论。

采纳的回答

dpb
dpb 2021-2-22
Well, your data look nothing at all like those in the sample plot and your vectors aren't of commensurate lengths, but--
plot3(t,ones(numel(t),2).*[0 1],[BY,CY]);
grid on
t1=1:numel(DY);t1=t1.';
hold on
plot3(t1,ones(size(t1)).*[2],[DY])
ylim([-0.5 2.5])
yticks(0:2)
set(gca,'YTickLabel',num2str([0:2].','Day %d'))
results in
It takes rotating around to get the orientation from default and will need cleaning up, but that's the basis to get the data on a 3D grid.
  1 个评论
Max Mortensen
Max Mortensen 2021-2-23
Thank you for your help, I didn't want to put the acutal data on here being that each day has 4000+ data points. But this has helped me. Thank you.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by