Items tagged with error error Tagged Items Feed


I've got this error in my code and I don't know why as I didn't get it when I used a different xn function. Any help would be greatly appreciated! Thank you in advance!

Kind regards,

Gambia Man



boxcount := proc (data, N) local n, xmax, xmin, xrange, ymax, ymin, yrange, dx, dy, i, j, ix, iy, sum, res; n := (1/2)*ArrayNumElems(data); xmax := max(seq(data[i, 1], i = 1 .. n)); xmin := min(seq(data[i, 1], i = 1 .. n)); ymax := max(seq(data[i, 2], i = 1 .. n)); ymin := min(seq(data[i, 2], i = 1 .. n)); xrange := xmax-xmin; xmin := xmin+(-1)*0.1e-1*xrange; xmax := xmax+0.1e-1*xrange; xrange := 1.02*xrange; yrange := ymax-ymin; ymin := ymin+(-1)*0.1e-1*yrange; ymax := ymax+0.1e-1*yrange; yrange := 1.02*yrange; dx := xrange/N; dy := yrange/N; res := Array(0 .. N-1, 0 .. N-1, 0); for i to n do ix := trunc((data[i, 1]-xmin)/dx); iy := trunc((data[i, 2]-ymin)/dy); res[ix, iy] := 1 end do; add(add(res[i, j], i = 0 .. N-1), j = 0 .. N-1) end proc:


bicationplot := proc (N) local Nr, Nt, x0, rmin, rmax, bif, k, ir, r, xn, i; global pts; Nr := 100; Nt := 200; x0 := .1; rmin := .75; rmax := 3.5; bif := Array(1 .. Nr*N, 1 .. 2); k := 1; for ir to Nr do r := rmin+ir*(rmax-rmin)/Nr; xn := x0; for i to Nt do xn := xn^2-r end do; for i to N do xn := xn^2-r; bif[k, 1] := r; bif[k, 2] := xn; k := k+1 end do end do; pts := bif end proc:




fractaldimension := proc (Noofitterations::integer, Npoints::integer, Nmax::integer) local res, xv, yv, line, stderrors, avgstderrors, i, avgline; avgstderrors := 0; avgline := 0; for i to Noofitterations do bicationplot(Npoints); res := [seq([1.0/n, boxcount(pts, n)], n = 1 .. Nmax, 10)]; xv := [seq(log(res[i][1]), i = 1 .. nops(res))]; yv := [seq(log(res[i][2]), i = 1 .. nops(res))]; line[i] := Fit(m*x+const, xv, yv, x, output = [leastsquaresfunction]); stderrors[i] := Fit(m*x+const, xv, yv, x, output = standarderrors) end do; for i to Noofitterations do avgstderrors := avgstderrors+stderrors[i] end do; avgstderrors := avgstderrors/Noofitterations; for i to Noofitterations do avgline := avgline+line[i] end do; avgline := avgline/Noofitterations; return FD = -(diff(avgline, x)), avgline, avgstderrors, loglogplot(res) end proc:

fractaldimension(10, 100, 100)

Error, (in boxcount) bad index into Array





Hello everybody

I have a system of ODEs that are too large. I am trying to solve this system using Maple. The corrsponding file has been uploaded. I have 2 question. 1- Does anyone know what is the source of error? 2- Is this a high expectation for Maple to solve such a too big system of ODEs. Note: It makes a few minutes to run all the programm.

Thanks in advance


This is my first post here, so I apologize for any errors or breaking of posting etiquette. I encountered a strange problem suddenly tonight when I tried running a Maple worksheet I've run succesfully (several times, without changes) in the past. The problem occured on both Maple 18 and Maple 2015, unfortunately I haven't been able to recreate a minimal working example with the same error, since my other worksheets doesn't show the error even though they contain identical caluclations. The problem also persists between copies of the worksheet.

The error I'm recieving is
"Error, (in TypeTools/ac_var_local) unable to handle expressions as (((D@@2)(phi))(theta(t)))(t)"

It occurs whenever I try to differentiate some (not all) expressions containing the above variable. I have no idea what this error even means, and I can't find anything googling. As said previously, I haven't been able to produce the error so I can't really give a concise short example but the flow is as follows:

g0 := simplify(subs(diff(y(t), t, t) = F+N*v(t), lhs(aby)-lhs(aby_y)), 'size');
->Produces an expression containing (((D@@2)(phi))(theta(t)))(t)
-> Gives Error

U := lhs(Vector([1, 0]).subs(subsVhcError, eom));
->Produces an expression containing (((D@@2)(phi))(theta(t)))(t)
-> Does not give error

Sorry that I can't be more descriptive, does anyone know have to sort this out, or might give me some more info on what the Error message might mean and how TypeTools are involved? As stated previously, the error just occured today and only affects one worksheet.

Edit: Link to worksheet with error



In this procedure I get the error, 

Error, `:=` unexpected

I know what it means I just can't seem to resolve it. Any help would be greatly appreciated! Thank you in advance for looking at this code!

Kind regards,

Gambia Man

HamilMat := proc (K::integer) local ni, mi, nj, mj, N, Hamil, Eigenvec, i, j, res; option remember; global Vij, U, L; N := K^2; ni := Vector(N); mi := Vector(N); nj := Vector[row](N); mj := Vector[row](N); for i to N do for j to K do res := (i+K-j)/K; if type(res, integer) = true then ni[i] := j; nj[i] := j; mi[i] := res; mj[i] := res end if end do end do; Hamil := Matrix(N, shape = symmetric); for i to N do for j from i to N do if i <> j then Hamil(i, j) := Vij(ni[i], mi[i], nj[j], mj[j]) elif i = j then Hamil(i, j) := Vij(ni[i], mi[i], nj[j], mj[j])+(1/2)*(ni[i]^2+mi[i]^2)*Pi^2/L^2 end if end do end do; return Eigenvec := Eigenvectors(Hamil, output = ['values', 'vectors']), Hamil end proc

Error, `:=` unexpected




I have used data and the curve fitting procedure to find a curve and I now have to put error bars on the graph to complete my task? I know that there is an errorplot function but I cant seem to find a way to do it with the curvefitting thing?


I have attached the whole worksheet, I hope someone can help! Thanks


Even if there was some method of exporting the graph to another medium that would also be very helpful



with(DETools, diff_table);

kB := 0.138064852e-22;

R := 287.058;

T := 293;

p := 101325;

rho := 0.1e-2*p/(R*T);

vr := diff_table(v_r(r, z));

vz := diff_table(v_z(r, z));

eq_r := 0 = 0;

eq_p := (vr[z]-vz[r])*vr[] = (vr[]*(vr[r, z]-vz[r, r])+vz[]*(vr[z, z]-vz[z, r]))*r;

eq_z := 0 = 0;

eq_m := r*vr[r]+r*vz[z]+vr[] = 0;

pde := {eq_m, eq_p};

IBC := {v_r(1, z) = 0, v_r(r, 0) = 0, v_z(1, z) = 0, v_z(r, 0) = r^2-1};

sol := pdsolve(pde, IBC, numeric, time = z, range = 0 .. 1);


what am I doing wrong?

it's telling me: Error, (in pdsolve/numeric/par_hyp) Incorrect number of boundary conditions, expected 3, got 2
but i did just as in the example :-/

Error, (in fsolve/polynom) Digits cannot exceed 38654705646


I am using fsolve to find numerical approximations to the roots of many fairly large polynomials (degrees up to ~80).  I often get this error message and I'm not sure why.  Is there any workaround?  Any help is much appreciated.


I'm writing a code and I seem to have an issue when trying to implement a procedure. Here is the code:



Z := 75; A := 189; k := 14.6; Rm := 8*R; r0 := 10^(-8)*R; c := 137.036; ms := 105.66/(.51100)

fmtoau := 10^(-15)/(0.529177e-1*10^(-9)):

R := 1.1*fmtoau*A^(1.0/(3.0)):

f := proc (x) options operator, arrow; 1/(1+exp(k*(x-1))) end proc:

n0 := 3*Z*k^2/(4*Pi*(Pi^2+k^2)*R^3):

n := proc (r) options operator, arrow; 4*Pi*n0*f(r/R) end proc:

int(r^2*n(r), r = 0 .. Rm);



plot(n/n0, 0 .. 2*R);


v1 := unapply(int(x^2*f(x), x), x):

Vfermi := proc (r) options operator, arrow; -4*Pi*n0*R^2*(R*(v1(r/R)-v10)/r+v2Rm-v2(r/R)) end proc:

Vuniform := proc (r) options operator, arrow; piecewise(r < R, -Z*(3/2-(1/2)*r^2/R^2)/R, -Z/r) end proc:

plot([Vuniform(r), Vfermi(r), -Z/r], r = r0 .. 2*R, V = 1.2*Vfermi(r0) .. 0, legend = ["uniform charge", "Fermi distribution", "point charge"]);



plotsol1s := proc (E, K, r0, S, col) local Eqns, ICs, fnl, gnl, r, soln; global ms, c; Eqns := diff(fnl(r), r) = gnl(r)*[E+2*ms*c^2-Vuniform(r)]/c-(K+1)*fnl(r)/r, diff(gnl(r), r) = -fnl(r)*[E-Vuniform(r)]/c-(1-K)*fnl(r)/r; ICs := fnl(r0) = 1, gnl(r0) = 0; soln := dsolve({Eqns, ICs}, numeric); plots:-odeplot(soln, [r, fnl(r)], r0 .. S, color = col) end proc:

plotsol1s(-3*10^5, -1, 10^(-10), Rm, red)

Error, (in f) unable to store '[HFloat(0.0)]' when datatype=float[8]




Any help would be greatly appreciated.


Gambia Man



Hello i want to solve the differential equation but i have these problem i don't understand  why !?


Euler_x := -(diff(lambda3(t), t)) = 0;
Euler_y := -(diff(lambda4(t), t)) = 0;
Euler_Vx := -lambda3(t)-(diff(lambda1(t), t)) = 0;
Euler_Vy := -lambda4(t)-(diff(lambda2(t), t)) = 0;
Euler_theta := lambda1(t)*sin(theta)-lambda2(t)*cos(theta) = 0;


sys:={Euler_x, Euler_Vx, Euler_y, Euler_Vy, theta=arctan(lambda2(t)/lambda1(t)), diff(Vx(t),t)=Vt*cos(theta), diff(Vy(t),t)=Vt*sin(theta)-g, diff(y(t),t)=Vy(t), diff(x(t),t)=Vx(t),x(0)=0, y(0)=0.302, lambda1(0)=0, lambda2(0)=0, lambda3(0)=0, lambda4(0)=0,transversalnost, x(176)=120};

ans:=dsolve(sys, numeric, output=listprocedure):

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system

thanks for your help



Hi everyone,

I'm trying to solve the following equation and unfortunately I get this error ( Error, (in Engine:-Dispatch) invalid subscript selector ) each time I try. Could you please help me??

I will be thankful for your great help.

solve(m*exp(-(m-1)*tij)*d2-θ+θ*tij-θ*(Σ(tkj, k = 1 .. c))-m*η*(1-exp(-tij))(m-1) = 0, tij)

Dear all,

I'm having a bit of trouble figuring out some error messages in the Maple debugger. When I debug some procedures I'm getting error messages like "Error, invalid input: %1 expects its %-2 argument, %3, to be of type %4, but received %5". Since the procedure calls a lot of other procedures I have to check every single one of them, to see, which one gives me the error message. It would be easier if I would know, what procedure/type hides behind the variables %1,... Is there a way to check this from within the debugger?

Thanks a lot.

The following commands show that I have an existing archive containing one procedure.

Why do I receive the error message when I try to save a second procedure to the same archive. The procedure I am trying to save has been executed within the same worksheet where I issue the savelib command.

> LibraryTools[ShowContents]("C:\\Program Files\\Maple 15\\Earl.mla");

LibraryTools[WriteMode]("C:\\Program Files\\Maple 15\\Earl.mla");

savelibname := "C:\\Program Files\\Maple 15\\Earl.mla";


[["RotateDisplay.m", [2015, 10, 1, 16, 3, 22], 41984, 655]]
[["C:\Program Files\Maple 15\Earl.mla", "WRITABLE"]]
"C:\Program Files\Maple 15\Earl.mla"

Error, cannot lock repository, C:\Program Files\Maple 15\Earl.mla


     I'm trying to solve this PDE, and Maple 2015 gives me a solution quickly. I can test the solution with pdetest() and this verifies that it works. However, when I try to verify this myself I don't get zero. Is there some trick pdetest() is using to that I am missing? Or is pdetest() wrong in this case?



eq := I*exp(-(2*I)*k*t)*k*sin(theta)*r^2*cos(theta)^3+4*exp(-(2*I)*k*t)*r*cos(theta)^3+2*(diff(Vr(t, r, theta), theta, theta))*cos(theta)*exp(-I*k*(sin(theta)*r+t))-6*(diff(Vr(t, r, theta), theta))*sin(theta)*exp(-I*k*(sin(theta)*r+t))-4*Vr(t, r, theta)*cos(theta)*exp(-I*k*(sin(theta)*r+t))-4*exp(-(2*I)*k*t)*r*cos(theta);

I*exp(-(2*I)*k*t)*k*sin(theta)*r^2*cos(theta)^3+4*exp(-(2*I)*k*t)*r*cos(theta)^3+2*(diff(diff(Vr(t, r, theta), theta), theta))*cos(theta)*exp(-I*k*(sin(theta)*r+t))-6*(diff(Vr(t, r, theta), theta))*sin(theta)*exp(-I*k*(sin(theta)*r+t))-4*Vr(t, r, theta)*cos(theta)*exp(-I*k*(sin(theta)*r+t))-4*exp(-(2*I)*k*t)*r*cos(theta)


sol := pdsolve(eq);

Vt(t, r, theta) = _F2(t, r)/cos(theta)^2+sin(theta)*_F1(t, r)/cos(theta)^2-((1/2)*I)*(cos(theta)^2*k^2*r^2-2)*exp(I*(sin(theta)*r-t)*k)/(k^3*r^2*cos(theta)^2)


pdetest(sol, eq);



eq2 := eval(eq, Vr(t,r,theta) = rhs(sol)):
eq2 := simplify(%);

-((1/2)*I)*exp(-(2*I)*k*t)*k*r^2*cos(theta)^3+2*exp(-(2*I)*k*t)*r*sin(theta)*cos(theta)-3*(diff(Vt(t, r, theta), theta))*sin(theta)*exp(-I*k*(sin(theta)*r+t))-2*Vt(t, r, theta)*cos(theta)*exp(-I*k*(sin(theta)*r+t))+(diff(diff(Vt(t, r, theta), theta), theta))*cos(theta)*exp(-I*k*(sin(theta)*r+t))


evalb(eq2 = 0);







Can anyone offer an explanation why the following error occurs, and how it can be avoided? Thanks!


plots:-shadebetween(2, 1/sqrt(-x^2+1), x = 0 .. (1/2)*sqrt(3))

Error, (in t) invalid input: nops expects 1 argument, but received 0





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