问题
We are given the following equations to help plot 'LOVE':
1/x for the 'L', (x^2)+(y^2)=9 for 'O', y=|-2x| for 'V', and -3|sin y| for 'E'.
This is the code I have so far:
subplot(2,2,1)
x=linspace(6,15,1000);
y1=1./x;
plot(x,y1)
subplot(2,2,2)
y2=(x^2)+(y^2)==9;
plot(x,y2)
subplot(2,2,3)
y3= abs(-2);
plot(x,y3)
subplot(2,2,4)
y4=-3*abs(sin*y);
plot(x,y4)
xlabel('X')
I'm having trouble plotting the 'O' graph, and also, is the rest of the code correct?
来源:https://stackoverflow.com/questions/59310995/how-do-i-plot-a-love-graph-in-matlab-using-the-following-equations