How to extract specific data?

1 次查看(过去 30 天)
Hello,
a1 = [10 20 30 40 50 60];
b1 = [11 21 31 41 51 61];
c1 = [12 22 32 42 52 62];
  1. I want to extract specific data such as
A1 = [10 11 12]
B1 = [20 21 22]
C1 = [30 31 32]
....
F2 = [60 61 62]
and plus,
2. e = [0 3 6];
I want to figure A1,B1,C1,....F1 in one figure,
plot(e,A1,e,B1,.....)
but it has too much groups(A1,B1,C1,...) , so I can't use 'hold on' and plot each group or array each groups.
Could someone know how to plot all groups at one figure?
Thanks for helping me.

采纳的回答

Star Strider
Star Strider 2020-10-6
Try this:
a1 = [10 20 30 40 50 60];
b1 = [11 21 31 41 51 61];
c1 = [12 22 32 42 52 62];
e = [0 3 6];
abc = cat(1, a1, b1, c1);
figure
plot(e, abc, '-x')
grid
producing:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by