On Fri, 22 Feb 2013, Raymond Toy wrote:
>>>>>> "Hugo" == Hugo Coolens <coolens at kahosl.be> writes:
>
> Hugo> I'm trying to plot the function in the code below for 0.1=<tau12=<5
> Hugo> I get however an error message:
> Hugo> plotting: range must be of the form [variable, min, max]; found:
> Hugo> [tau[12],0.1,5]
>
> Hugo> p:tau[11]*tau[22];
> Hugo> sigma:tau[11]+tau[12]+tau[22];
> Hugo> A:sqrt(p^2+2*p*sigma)-p;
> Hugo> hjmax(p,sigma,A):=sqrt((1+A/p)/((1-A/sigma^2)^2+A/p));
> Hugo> subst([A=sqrt(p^2+2*p*sigma)-p,sigma=tau[11]+tau[12]+tau[22],p=tau[11]*tau[22],tau[11]=1,tau[22]=1],hjmax(A,sigma,p));
> Hugo> eq:diff(%,tau[12]);
> Hugo> plot2d(%,[tau[12],0.1,5]);
>
> Hugo> How do I correct the plot-statement?
>
> Perhaps it's a bug that plotd2 doesn't like tau[12] as the independent
> variable.
>
> A simple solution would be to replace tau[12] with a simple variable
> like x. Thus, this works for me:
>
> plot2d(subst(tau[12]=x, eq), [x, 0.1, 5]);
>
> Instead of using tau[<n>], you might consider just using tau<n> in
> your equations. tau[<n>] has some specific meanings to maxima which
> may not be what you want. It seems you just want tau[<n>] to produce
> subscripted variables on display.
Thanks this solves the problm
best regards,
hugo