Mathematica 画二维曲线 画图 编程

2024-11-24 07:53:55
推荐回答(1个)
回答1:

aaa1 = {}; bbb1 = {}; aaa2 = {}; bbb2 = {};
aaa3 = {}; bbb3 = {}; aaa4 = {}; bbb4 = {};
For[x = 0.1, x <= 8, x += 0.1,
y = 1/x;
y1 = 2/x;
AppendTo[aaa1, {x, y}];
AppendTo[bbb1, {x, y1}];
AppendTo[aaa2, {-x, y}];
AppendTo[bbb2, {-x, y1}];
AppendTo[aaa3, {-x, -y}];
AppendTo[bbb3, {-x, -y1}];
AppendTo[aaa4, {x, -y}];
AppendTo[bbb4, {x, -y1}];
];
ListPlot[{aaa1, bbb1, aaa2, bbb2, aaa3, bbb3, aaa4, bbb4},
Joined -> True]