Plotting certain values of a matrix

조회 수: 3 (최근 30일)
Josh
Josh 2019년 3월 17일
댓글: Josh 2019년 3월 17일
Hello I have a 100x1 matrix and would like to plot n=2 and n=100 values against x how would I go about doing this? Thanks for any help

채택된 답변

madhan ravi
madhan ravi 2019년 3월 17일
plot(repmat(100,100,1),x)
% ^^^-—-—-n
hold on
plot(repmat(2,100,1),x)
  댓글 수: 9
madhan ravi
madhan ravi 2019년 3월 17일
편집: madhan ravi 2019년 3월 17일
'y' represents color of the plot which is yellow.
See my original answer after using hold on plot another line to the same figure
doc hold
doc plot
I suggest you to do MATLAB onramp course which is free and takes few hours to complete by then you will get know the basics of MATLAB.
Josh
Josh 2019년 3월 17일
Thanks for the help

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by