Items tagged with error error Tagged Items Feed

http://www.maplesoft.com/applications/view.aspx?SID=5083&view=html&L=F

Error, (in hanoi) cannot determine if this expression is true or false: 0 < n

N:=n:moves:=[];
hanoi:=proc(N,source,dest,aux) global moves;
if N>0 then
hanoi(N-1,source,aux,dest):
moves:=[moves[],[N,source,dest]]:
hanoi(N-1,aux,dest,source);
end if:
end proc:
sol:=hanoi(n,1,3,2);

Hi,

     I was wondering if there is an easy way to define another set of indices in the Physics package. For example, usually greek indices are for all 4 spacetime dimensions. Using Setup(spaceindices = lowercaselatin), we can define 3 of those as space indices. I was hoping there is a more general command, so that I could use only 2 indices as "space indices". For example, X[i] would run over x,y while X[mu] would run over t, z. Is there such a command in the Physics package, or a simple way to implement this personally?

Second thing. I was playing with SumOverRepeatedIndices on an expression that contained both space indices and spacetime indices. Usually this seems to work, but in my attached example it does not. I tried the same thing with just spacetime indices in Maple 18 (newest Physics update) and it gave the same error.


Any help appreciated,

PhysicsBug.mw

Hi, I am stumped I've tried many ways but end up getting a graph with nothing on it or errors. I am trying to plot the tangent line to the equation f(x) = 2cosx-x^2 at x = 2; In addition, how would I plot the tangent line and the equation on one graph with distinctive line pattern for example, one being blue and dotted, while the other being red solid).

 

Thanks in advance!

I always find it difficult to debug maple codes. I'm used to the debug feature in programing laguages like C#, VB.Net, JAVA even MATLAB. They all have one thing in common which is the use of breakpoints. Breakpoints are inserted at different parts of a code so as to follow the program execution and to trace out errors. Is any similar feature in Maple? I only know the DEBUB() function and not that helpful to me.

Please, I have an error message which says Error, (in eul) illegal use of a formal parameter. I can't find the cause of the error. I got the result I wanted if i remove these lines eul := proc(x,y) , return yt: , end proc: and

yv := eul(x,y); that is if I consider the for..loop alone.

fxy := proc(x,y)
  return x/y;
end proc:

a := 0:
b := 1:
N := 10:
h := evalf((b-a)/N):
x := 0:
y := -2:
yt := Vector(3):

eul := proc(x,y)
    for j from 1 to 3 do
          y[j]:= y + h*fxy(x,y):
          x:= 0 + j*h:
          y := y[j]:
          yt[j] := y:
    end do:
    return yt:
end proc:
yv := eul(x,y);

Hi all, 

I'm trying to implement the smithChart on Maple, but this error "Error, (in unknown) invalid transform: output is not 2 or 3 element" keeps popping up for some reason. I have no idea how to fix it. Can anyone help me with this? Here is the smithChart:




smithChart.mw

 

smithChart := proc(r)
  local i, a, b, c;
   a := PLOT(seq(plottools[arc]([-i*r/4, 0], i*r/4, 0..Pi),
                 i = 1..4),

  plottools[arc]([0, r/2], r/2,
            Pi-arcsin(3/5)..3*Pi/2),
  plottools[arc]([0,r], r, Pi..Pi+arcsin(15/17)),
  plottools[arc]([0, 2*r], 2*r,
            Pi+arcsin(3/5)..Pi+arcsin(63/65)),
  plottools[arc]([0,4*r], 4*r,
            Pi+arcsin(15/17)..Pi+arcsin(63/65)));

  b := plottools[transform]((x, y) -> [x-y])(a);
  c := plottools[line]([0,0], [-2*r, 0]):
  plots[display](a, b, c, axes = none, scaling = constrained, args[2..nargs]);
  end proc:

smithChart(1);
Error, (in unknown) invalid transform: output is not 2 or 3 elements

Hello,

Anyone here know how to use the read command. I tried to use it to call and run the particular code but it didnt work. It produce this such error 

> read "02ExactSoln.m";
Error, could not open `02ExactSoln.m` for reading

I have no idea how to fix it. Or do I need to locate the code in any specific folder. 

Thanks

 

 

I'm trying to build a Maple procedure that will generate vector fields on a metric with certain properties. Working with metric g over the coordinates {u,v,w}, call the field X = (a(u,v,w), b(u,v,w), c(u,v,w)). The field should satisfy <X, X> = 0 and have the directional covariant derivative of X in the direction of each coordinate vector field = 0 (with resepct to the Levi-Civita conenction).

Basically, these conditions yield a system of 3 PDEs and an algebraic expressionin terms of a,b,c. I've been trying to solve them using pdsolve, but I'm getting the error message:

>Error, (in pdsolve/sys) the input system cannot contain equations in the arbitrary parameters alone; found equation depending only on _F1(u,v,w): _F1(u,v,w)

I've attached my worksheet. Can anyone help me out?

 

Thanks! ppwaves.mw

Hi, I am new to Maple. I want to plot a graph in a separate window from command-line maple. I tried the following code and getting this error

> plotsetup(window);
> plot(x,x=-10..10);
Plotting error, no plot device driver for plotdevice=window
>

 

I tried maplet but I am not getting the plot

> plotsetup(maplet);
> plot(x,x=-10..10);
Initializing Java runtime environment.
>

 

What should I do to get the plot??

for a to z1/T1 do ics[a*T1] := [g0(0, a*T1) = r, g0(1, a*T1) = s] end, this loop runs correctly for T1:=1, but gives the too many levels of recursion error for T1<1. In this loop i am inserting equations g0 in a list ics.

Hey there,

I've a numerical solved system of differential equations, which depend on one argument and one index. I can solve it, but when I try plot it I have this error: Error, (in plot) two lists or Vectors of numerical values expected.

Could anyone help me figure out what I'm doing wrong?

 

> restart;
> A := 115.1558549; B := .3050464658; n := 3; f0 := 0.5e-4;
               
>f:=theta->f0*(cos(arcsin(sin(theta)/n)))^2;
  I0:=Ir(z)+sum(Is[k](z),k=1..20);

> alpha := [0, 1, 2, 3, 4, 5, 6];

Theta := [3*Pi*(1/180), 6*Pi*(1/180), 9*Pi*(1/180), 12*Pi*(1/180), 15*Pi*(1/180), 18*Pi*(1/180), 21*Pi*(1/180), 24*Pi*(1/180), 27*Pi*(1/180), 30*Pi*(1/180), 33*Pi*(1/180), 36*Pi*(1/180), 39*Pi*(1/180), 42*Pi*(1/180), 45*Pi*(1/180), 48*Pi*(1/180), 51*Pi*(1/180), 54*Pi*(1/180), 57*Pi*(1/180), 60*Pi*(1/180)];

>G:= theta->A*sin(theta)*cos(2*arcsin((sin(theta)/n)))/((1+sin(theta)^2/B^2)*cos(arcsin(sin(theta)/n)));

>for j from 1 to 7 do
d1 := diff(Ir(z), z) = -sum(G(Theta[k])*Ir(z)*Is[k](z)/I0,k=1..20)-alpha[j]*Ir(z)-sum(f(Theta[k])*Ir(z),k=1..20):
d2 := diff(Is[1](z), z) = G(Theta[1])*Ir(z)*Is[1](z)/I0-alpha[j]*Is[1](z)+f(Theta[1])*Ir(z):
d3 := diff(Is[2](z), z) = G(Theta[2])*Ir(z)*Is[2](z)/I0-alpha[j]*Is[2](z)+f(Theta[2])*Ir(z):
d4 := diff(Is[3](z), z) = G(Theta[3])*Ir(z)*Is[3](z)/I0-alpha[j]*Is[3](z)+f(Theta[3])*Ir(z):
d5 := diff(Is[4](z), z) = G(Theta[4])*Ir(z)*Is[4](z)/I0-alpha[j]*Is[4](z)+f(Theta[4])*Ir(z):
d6 := diff(Is[5](z), z) = G(Theta[5])*Ir(z)*Is[5](z)/I0-alpha[j]*Is[5](z)+f(Theta[5])*Ir(z):
d7 := diff(Is[6](z), z) = G(Theta[6])*Ir(z)*Is[6](z)/I0-alpha[j]*Is[6](z)+f(Theta[6])*Ir(z):
d8 := diff(Is[7](z), z) = G(Theta[7])*Ir(z)*Is[7](z)/I0-alpha[j]*Is[7](z)+f(Theta[7])*Ir(z):
d9 := diff(Is[8](z), z) = G(Theta[8])*Ir(z)*Is[8](z)/I0-alpha[j]*Is[8](z)+f(Theta[8])*Ir(z):
d10 := diff(Is[9](z), z) = G(Theta[9])*Ir(z)*Is[9](z)/I0-alpha[j]*Is[9](z)+f(Theta[9])*Ir(z):
d11 := diff(Is[10](z), z) = G(Theta[10])*Ir(z)*Is[10](z)/I0-alpha[j]*Is[10](z)+f(Theta[10])*Ir(z):
d12 := diff(Is[11](z), z) = G(Theta[11])*Ir(z)*Is[11](z)/I0-alpha[j]*Is[11](z)+f(Theta[11])*Ir(z):
d13 := diff(Is[12](z), z) = G(Theta[12])*Ir(z)*Is[12](z)/I0-alpha[j]*Is[12](z)+f(Theta[12])*Ir(z):
d14 := diff(Is[13](z), z) = G(Theta[13])*Ir(z)*Is[13](z)/I0-alpha[j]*Is[13](z)+f(Theta[13])*Ir(z):
d15 := diff(Is[14](z), z) = G(Theta[14])*Ir(z)*Is[14](z)/I0-alpha[j]*Is[14](z)+f(Theta[14])*Ir(z):
d16 := diff(Is[15](z), z) = G(Theta[15])*Ir(z)*Is[15](z)/I0-alpha[j]*Is[15](z)+f(Theta[15])*Ir(z):
d17 := diff(Is[16](z), z) = G(Theta[16])*Ir(z)*Is[16](z)/I0-alpha[j]*Is[16](z)+f(Theta[16])*Ir(z):
d18 := diff(Is[17](z), z) = G(Theta[17])*Ir(z)*Is[17](z)/I0-alpha[j]*Is[17](z)+f(Theta[17])*Ir(z):
d19 := diff(Is[18](z), z) = G(Theta[18])*Ir(z)*Is[18](z)/I0-alpha[j]*Is[18](z)+f(Theta[18])*Ir(z):
d20 := diff(Is[19](z), z) = G(Theta[19])*Ir(z)*Is[19](z)/I0-alpha[j]*Is[19](z)+f(Theta[19])*Ir(z):
d21 := diff(Is[20](z), z) = G(Theta[20])*Ir(z)*Is[20](z)/I0-alpha[j]*Is[20](z)+f(Theta[20])*Ir(z):
dsys := {d1, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d2, d20, d21, d3, d4, d5, d6, d7, d8, d9}:
dSol[j] := dsolve({op(dsys), Ir(0) = 1, Is[1](0) = 0.1e-1, Is[2](0) = 0.1e-1, Is[3](0) = 0.1e-1, Is[4](0) = 0.1e-1, Is[5](0) = 0.1e-1, Is[6](0) = 0.1e-1, Is[7](0) = 0.1e-1, Is[8](0) = 0.1e-1, Is[9](0) = 0.1e-1, Is[10](0) = 0.1e-1, Is[11](0) = 0.1e-1, Is[12](0) = 0.1e-1, Is[13](0) = 0.1e-1, Is[14](0) = 0.1e-1, Is[15](0) = 0.1e-1, Is[16](0) = 0.1e-1, Is[17](0) = 0.1e-1, Is[18](0) = 0.1e-1, Is[19](0) = 0.1e-1, Is[20](0) = 0.1e-1}, [Ir(z), Is[1](z), Is[2](z), Is[3](z), Is[4](z), Is[5](z), Is[6](z), Is[7](z), Is[8](z), Is[9](z), Is[10](z), Is[11](z), Is[12](z), Is[13](z), Is[14](z), Is[15](z), Is[16](z), Is[17](z), Is[18](z), Is[19](z), Is[20](z)], numeric);
end do:


>for j from 1 to 7 do
dSol[j](0.4);
as:='as':
for l from 1 to 20 do
as[l]:=[Theta[l],rhs(dSol[j](0.4)[2+l])];
od:
plo[j]:=convert(as,listlist);
od:


>plot(plo[2],plo[1]);
Error, (in plot) two lists or Vectors of numerical values expected

Hello everyone,

I'm trying to solve system of ODE but it return this Error, (in fproc) unable to store 'YP[4]' when datatype=float[8]
How can this be corrected, see the worksheet YP.mw

Thanks.

I'm currently having some difficulties in solving a system of differential equations numerically.

This is my code.

 

I am trying to integrate product of exp(t+s) and a piecewise polynomial but the result can not be read and not usefull. also I used numerical integration function "Quadrature" but the result did not change.

error.mwerror.mw

Hi guys,

I'm trying to draw a phase portrait based on a system of differential equations, but executing the DEplot command gives me the response in the title. 

The command I entered is this one :

DEplot(sysdif,[u(t),nu(t)],t=0..50,{[u(0)=0.831,nu(0)=0.7]},linecolor=red,numpoints=1000, thickness=1, u=0.5...1, nu=0.6...1, color=black);

the system of equation is this one :

eqd1 := diff(u(t), t) = u(t)*[-gamma + (rho)/(mu - nu(t)) - delta*u(t) + pii - (tau)/(alpha + epsilon*exp(-beta*((omega-u(t))/(kappa-u(t)))))] ;
eqd2 := diff(nu(t), t) = nu(t)*[(omega-u(t))/(kappa-u(t)) - (tau)/(alpha+epsilon*exp(-beta*((omega-u(t))/(kappa-u(t)))))] ;

 

the model is calibrated. I understand that maple cannot store a kind of number but even changing the parameters won't help. I've been looking for people with same error message but using solutions provided by forum members don't work. Before getting that error message i did have the one with "vars must be declared as a list ..." so I did :

u:='u' ;

nu:='nu';

but now I have the error  "unable to store  '[HFloat(0.005711776872341132)]' when datatype=float[8]".

Does anybody have an idea of the solution to my problem ?

Thanks for your time,

best regards,

Louis

 

1 2 3 4 5 6 7 Last Page 1 of 85