MATLAB Answers

How do I scatter the first plot into dots instead of the dash that it is set on?

1 view (last 30 days)
Derek Paul
Derek Paul on 9 Mar 2017
Answered: KSSV on 9 Mar 2017
syms y(x) x
y1=dsolve(diff(y,x,2)+y==0);
y2=dsolve(diff(y,x,2)+y==-cos(1.1*x));
y2=simplify(y2);
h=ezplot(cos(x)+sin(x))
set(h,'LineStyle','-.')
hold on
ezplot(cos(x)+sin(x)+100*cos(1.1*x)/21)
title('Plots of solutions')

  0 Comments

Sign in to comment.

Answers (1)

KSSV
KSSV on 9 Mar 2017
Change the line
set(h,'LineStyle','-.')
to
set(h,'LineStyle',':')

  0 Comments

Sign in to comment.

Sign in to answer this question.