Question about plotting, getting subvectors
이전 댓글 표시
Hi,
I'm new to Matlab central, but not new to Matlab itself. I'm running a simulation which has an end results of two columns of values. I ususally plot these values using plot(1stcolumn,2ndcolumn). My question is: how do I plot only a small amount of these values? Like say 1stcolumn(40) to 1stcolumn(60)? I've tried exactly this in Matlab, but I am only getting an empty graph sheet (no errors are showing either):
plot(1stcolumn(40),2ndcolumn(40),1stcolumn(40),...
2ndcolumn(40)1stcolumn(40),2ndcolumn(40),...
1stcolumn(40),2ndcolumn(40))
What am I doing wrong?
RebSam
채택된 답변
추가 답변 (2개)
Jan
2011년 7월 30일
1 개 추천
"1stcolumn", "2ndcolumn" etc are no valid Matlab symbols, because they start with a number. Are you sure that the posted code does not produce errors?!
댓글 수: 1
Paulo Silva
2011년 7월 30일
good catch, for some strange reason I didn't noticed that the variables started with numbers, too much trust on OP codes.
REBECCA
2011년 8월 1일
0 개 추천
댓글 수: 1
Paulo Silva
2011년 8월 1일
REBECCA and all that might read this, please do the effort of trying the code first before asking questions, that saves us time and we can use the extra time to help others.
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!