필터 지우기
필터 지우기

How to extract specific data?

조회 수: 2 (최근 30일)
hj lee
hj lee 2020년 10월 6일
댓글: Star Strider 2020년 10월 6일
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:
  댓글 수: 2
hj lee
hj lee 2020년 10월 6일
Thank you very much!
Star Strider
Star Strider 2020년 10월 6일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (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