How do I plot two different variables on the same graph but in two different colors?
조회 수: 5 (최근 30일)
이전 댓글 표시
I am trying to plot a "butterfly curve" with the two formulas:
I got the plot to run, however, I would like x to be the color blue and y to be the color red. I cannot get the two seperate colors to show up for each variable. Here is my code:
clc
t=0:(0.0625):100;
ev=exp(1); %just the constant e
for i=1:2
hold on
x=sin(t).*(ev.^(cos(t))-(2.*cos(4*t))-(sin(t/12).^5))
y=cos(t).*(ev.^(cos(t))-(2.*cos(4*t))-(sin(t/12).^5))
plot(x,y)
end
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!