I am trying to plot the graphs of y=-x mod 1 and y=-0.5*cos(2*pi*-x) mod 1. There are two issues here, for some reason there are points for eg x=0.25 where the y value should be 1 but instead theres a line between 0.25 to the next x value. Secondly MATLAB is plotting and straight line on x=0 for the line y=-x mod 1 which doesnt make sense. any help would be appreciated.
clearclcclfsyms x yf1 = y == mod(-0.5*cos(2*pi*-x),1);f2 = y == mod(-x,1);%f3 = y == mod(-0.5*cos(2*pi*(-y)),1);
p1 = fimplicit(f1,[-0.5 1.8 0 1]);hold onp2 = fimplicit(f2,[-0.5 1.8 0 1]);%p3= fimplicit(f3,[-2 2 0 1]);
hold offfsize=15;title('Intersection of curves','FontSize',fsize)xlabel('x(t)','FontSize',fsize)ylabel('y(t)','FontSize',fsize) %s=vpasolve(mod(y+0.5*cos(2*pi*y),1),mod(x+y,1),[1.7,0.5]);
%s.x
%s.y
% End of Program 05a.
Best Answer