How do I plot a “LOVE” graph in MatLab using the following equations?

自闭症网瘾萝莉.ら 提交于 2019-12-25 19:58:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!