Volker:
Thanks for your suggestions:
> The problem here is, that if you use the range [AStep,dA_1,dA_6]
> the plot2d command expects a function of one variable named AStep.
>
> This is not the case. Two ways out:
>
> 1. possibility:
> Create a function which has AStep as the only variable:
>
> (%i18) deltaX_Astep(Astep):= deltaX(C[1],C[2],C[3],Astep);
> (%o18) deltaX_Astep(Astep) := deltaX(C , C , C , Astep)
> 1 2 3
> (%i19) plot2d( [[discrete,xy], deltaX_AStep(AStep)],
> [AStep,dA_1,dA_6],
> [gnuplot_curve_styles,["with lines", "with points"]] );
> (%o19)
I've changed the function so that it is only in one variable (see
below), but I'm still getting precisely the same error:
"Unknown plot option specified: Astep"
> 2. possibility:
> Use a lambda expression:
>
> (%i20) plot2d( [[discrete,xy], lambda([AStep], deltaX(C[1],C[2],C[3],AStep))],
> [AStep,dA_1,dA_6],
> [gnuplot_curve_styles,["with lines", "with points"]] );
With this, I get a line connecting the discrete points, but no curve for
the function. My code is below.
Rich
==================================================================
dA1: 0.01;
dA2: 0.02;
dA3: 0.03;
dA4: 0.05;
dA5: 0.1;
dA6: 0.2;
dX1: 0.2;
dX2: 0.1667;
dX3: 0.1428;
dX4: 0.0714;
dX5: 0.02778;
dX6: 0.01515;
dAdX: [ [dA1,dX1],[dA2,dX2],[dA3,dX3],[dA4,dX4],[dA5,dX5],
[dA6,dX6] ];
P: matrix( [(1 / dA1^2), (1 / dA1), 1],
[(1 / dA4^2), (1 / dA4), 1],
[(1 / dA6^2), (1 / dA6), 1] );
S: matrix( [dX1],
[dX4],
[dX6] );
C: invert(P) . S;
dX(dA):= (C[1] / dA^2) + (C[2] / dA) + C[3];
plot2d( [[discrete,dAdX], lambda([Astep], dX(Astep))], [Astep,dA1,dA6],
[gnuplot_curve_styles, ["with points", "with lines"]] );