필터 지우기
필터 지우기

How can I plot the first 1000 numbers in my matrix?

조회 수: 11 (최근 30일)
Greg Smith
Greg Smith 2018년 6월 4일
댓글: Greg Smith 2018년 6월 5일
I have a 15364 x 6 matrix and I only want to plot the first 167 rows. How can I transform my 15364x6 into a 167x6 while keeping all the numbers in order?

답변 (2개)

Sid Parida
Sid Parida 2018년 6월 4일
Let A be the original matrix this should do it:
B = A(1:167, :)
  댓글 수: 1
Greg Smith
Greg Smith 2018년 6월 5일
I get the following error:
Index in position 1 exceeds array bounds (must not exceed 1).

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


Honglei Chen
Honglei Chen 2018년 6월 4일
You can do
y = x(1:167,:)
where x is the original data matrix.
HTH

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by