putting an exception in the plot command

조회 수: 1 (최근 30일)
cgo
cgo 2017년 8월 9일
편집: José-Luis 2017년 8월 9일
Hi.
I am plotting columns 1:20 except 5:7, how can I put in the plot command? Thanks

채택된 답변

José-Luis
José-Luis 2017년 8월 9일
편집: José-Luis 2017년 8월 9일
You could use setdiff() to do the indexing:
data = rand(10,20);
plot(data(:,setdiff(1:20,5:7)));
Please accept the answer that best solves your problem.

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