Missing command in "line" (easy question)

1 Ansicht (letzte 30 Tage)
Giorgos
Giorgos am 31 Mai 2016
Kommentiert: Walter Roberson am 31 Mai 2016
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

Antworten (1)

Walter Roberson
Walter Roberson am 31 Mai 2016
LineStyle
  2 Kommentare
Giorgos
Giorgos am 31 Mai 2016
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 am 31 Mai 2016
line([1 1],[0 1],'Color',[0 0 0], 'Linestyle', '--')

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by