Missing command in "line" (easy question)

1 vue (au cours des 30 derniers jours)
Giorgos
Giorgos le 31 Mai 2016
Commenté : Walter Roberson le 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

Réponses (1)

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

Connectez-vous pour commenter.

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by