Missing command in "line" (easy question)

조회 수: 1 (최근 30일)
Giorgos
Giorgos 2016년 5월 31일
댓글: Walter Roberson 2016년 5월 31일
Hello Guys/girls,
I want to make a line using the "line" command:
line([0 1],[1 1],'color',[0 0 0 ],' missing command for dashed line')
what is the addition if I want to make this line dashed, "-" doesnt seem to work. Cant find something on the internet
Thanks, G

답변 (1개)

Walter Roberson
Walter Roberson 2016년 5월 31일
LineStyle
  댓글 수: 2
Giorgos
Giorgos 2016년 5월 31일
Thank you for you replay,
The "LineStyle = Dashed" addon does not seen to work, but rather generates an invalid error message..
t = 0:0.1:3;
y = trapmf(t,[0 1 2 3]);
plot (t,y, 'k', 'LineWidth',2);
set(gca,'XTickLabel',{'0','t_{acc}','','t_{max}','','t_{dec}','t_{total}'})
set(gca,'YTickLabel',{'0','','\omega_{max}'})
axis ([ 0 3 -0 1.5]);
xlabel ('Time [sec]');
ylabel ('Angular Velocity');
title('Velocity Profile of Rotary Actuator')
hold on
line([1 1],[0 1],'Color',[0 0 0]); %<---- HERE I NEED DASHED LINE
line([2 2],[0 1],'Color',[0 0 0]);
annotation('arrow',[0.28 0.39],...
[0.08 0.08]);
Walter Roberson
Walter Roberson 2016년 5월 31일
line([1 1],[0 1],'Color',[0 0 0], 'Linestyle', '--')

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by