3

Maxima でコードを書いていて、3 つのプロットがあります。これらを個別にプロットするのに問題はありませんが、1 つの for ループで実行せずにすべてを 1 つのプロットに配置する方法を理解できません。詳細を詳しく説明しなければ、これは私のコードでは困難です。

    for i:1 step 1 while i<=n-1 do(figgdown[i]:plot2d(
    [discrete,[xx[i], -xx[i]],[p[i],p[i]]]));
    for i:1 step 1 while i<=n-1 do(figgup[i]:plot2d(
    [discrete,[xx[i], -xx[i]],[q[i], q[i]]]));
    for i:1 step 1 while i<=n-1 do(figgmiddle[i]:plot2d(
    [discrete,[xx[i], -xx[i]],[pq[i], pq[i]]]));

グラフィックが一緒に表示される Mathematica の Show 関数のようなことを行う方法はありますか? ベスト、ベン

4

2 に答える 2

4

リストを保持できます

n: 10;
x: makelist(2*%pi*i/n, i, 0, n);

p: [];
y1: sin(x);
p: endcons([discrete, x, y1], p);

y2: cos(x);
p: endcons([discrete, x, y2], p);

/* display all plots in p */
plot2d(p);
于 2013-04-02T15:57:13.577 に答える