accessing data from 1st row to nth row from two columns and plotting them
조회 수: 13 (최근 30일)
이전 댓글 표시
1
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 3월 9일
편집: Ameer Hamza
2020년 3월 9일
You can use the indexing to specify the the rows and columns you want to extract.
data = rand(20, 5); % example matrix
x = data(2:end, 1); % row 2 to 15 from column 1
y = data(2:end, 2); % row 2 to 15 from column 2
plot(x,y);
The above code will extract row 2 to 15 from column 1 and row 2 to 15 from column 2 and plot them.
댓글 수: 3
Ameer Hamza
2020년 3월 9일
Sousheel Pappu, check the edited answer. You can use end to indicate the last row in the column.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!