필터 지우기
필터 지우기

please show me how to use 'line commander'

조회 수: 2 (최근 30일)
상태 박
상태 박 2020년 11월 26일
댓글: 상태 박 2020년 11월 28일
hello!
i want to know how to use 'line commander'
Error: Value is not a numeric scalar value ( i wonder about this. x_p(1) = 3 x_p(2)= 2.9968 ... isn't it scalar value?)
u=line(x,y,'Color','k','LineWidth','2');
what is the matter?
in advance, person that answers my questiion. thank you!
for i=1:length(time) %length(time) =100
n2=fix(length(time)/n1); % n1=30
hold on
axis equal
x=[0 x_p(i)]; %x_p(i) is 100*1 matrix
y=[0 y_p(i)]; %y_p(i) is 100*1 matrix
u=line(x,y,'Color','k','LineWidth','2');
F(i)=getframe;
if(i==length(time))
break;
end
if(0==rem(i,n2))
else
delete(u)
end

채택된 답변

Walter Roberson
Walter Roberson 2020년 11월 26일
u=line(x,y,'Color','k','LineWidth',2);
  댓글 수: 4
Walter Roberson
Walter Roberson 2020년 11월 26일
If you are going to draw a line and then erase it, then it is more efficient to instead create the line just once and to update its XData and YData properties the other times.
상태 박
상태 박 2020년 11월 28일
thank you very much!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by