Items tagged with syntax syntax Tagged Items Feed

hi. please help me about modeling population migration. i am writing a sample for drawing plot in maple, however maple has not any error, but working incorrectly. my program is:


> u := am+bm*m0*x*t+cm*n0*y*t;
> v := an+bn*m0*x*t+cn*n0*y*t;
> eq1 := diff*(x*t, t) = 2*A*(sinh(u)-x*t*cosh(u));
> eq2 := diff*(y*t, t) = 2*A*(sinh(v)-y*t*cosh(v));
> init := x*0 = X, y*0 = Y;
> sol := dsolve*({eq1, eq2, init}, {x(t), y(t)}, numeric);
> param :=A=1/(2) ,am=0 , bm=1.2*(e)^(-4) ,cm= 0.5*(e)^(-5) ,;
> m0 = 10000, an = 0, bn = -exp(-4), cn = 1.2*exp(-3), n0 = 1000;
> save u, v, param, " narm.sav";
> init := x*0 = 0, y*0 = 0.1e-1;
> eq1 := subs*(param, eq1);
> eq2 := subs*(param, eq2);
> sol := dsolve*({eq1, eq2, init}, {x(t), y(t)}, numeric);
> with*plots;
> odeplot*(sol, [x*t, y*t], 0 .. 60, numpoints = 300, view = [-1 .. 1, -1 .. 1]);
> odeplot*(sol*d, [t, x*t, y*t], 0 .. 60, numpoints = 300, orientation = [70, 55], colour = black, axes = normal);
> init := x*0 = -1, y*0 = 1;
> sold := dsolve*({eq1, eq2, init}, {x(t), y(t)}, numeric);
> odeplot*(sold, [x*t, y*t], 0 .. 60, numpoints = 300, view = [-1 .. 1, -1 .. 1], color = black);

Here is my code

ma[1] := [-885.880598855072776, [bh = 0., g0h = 0., g1h = 0.825946224722250e-4]]

ma[2] := [-877.957885609114328, [bh = 347.116836805625, g0h = 0., g1h = 0.164861392564e-3]]

ma[3] := [-863.445203144006655, [bh = 0., g0h = 0., g1h = 0.787090377403668e-4]]

avb := 90.5276611129000; avg0 := 0; avg1 := 0.92225359e-4;

for j from 1 to 3 do

assign(ma[j][2]);

A[j] := [(avb-bh)^2, (avg0-g0h)^2, (avg1-g1h)^2] 

end do;

 

Result is that

A[1] := [4763.19965962732, 0., 1.13103562500664*10^(-10)]

Error, invalid left hand side in assignment

 it only shows A[1], but no A[2] and A[3]

Please help!

Hello Everyone,

 

I would like  to write a code to calculate the riemann sum approximation of the curve sin(sqrt(x^2+y^2)+1 

calculate the actual volume using integration

use the ranges x=[-2pi to 2pi]=y, and 20 subdivisions.

also display the curve and the parallelepiped approximations on the same plot.

 my code give me  an error..please someone can advise me which part of my code is not correct..

Thanks very much in advance!

> g := proc (x, y) options operator, arrow; sin(sqrt(x^2+y^2))+1 end proc;

 Z := g(x, y);

 

 X := Array(0 .. n); Y := Array(0 .. n); Z := Array(0 .. n);

 

c := -2*Pi; d := 2*Pi;

a := -2*Pi; b := 2*Pi;

n := 15;

s := 0;

X[0] := a; Y[0] := c; Z := g[X[0], Y[0]]; s := 0;

dX := (b-a)/N;dY := (d-c)/N;

    for i from 0 to N do      for j from o to N do     s:=s+Z[i]*dX*dY     X[i]:=X[i-1]+dX: Y[i]:=Y[i-1]+dY: Z[i]:=g([Xi],[Yi])  end do;

This the error message i am getting (Error, unterminated loop)

 

 

 

 

 

 

 

 

When I take the derivative of abs(x), I use the chain rule and get this

When I ask Maple to differentiate abs(x), I get this:

I read the help file on "signum", and I expected this to work, but it does not.

 

 

How can I represent signum in normal calculus syntax when working the derivative of functions involving abs(x)?

 

 

 

I have the following construct:
for i from 1 to 10 do
cubeprod:=i^3;
if irem(cubeprod,3)=0  and if(modp(cubeprod,2)<>0 then
cubesum(cubeprod);// I need both if statements to be true in order to invoke cubesum(). I've noticed that using an and between both if statements is incorrect but :

for i from 1 to 10 do
cubeprod:=i^3;
if irem(cubeprod,3)=0 then 
 if modp(cubeprod,2)<>0 then cubesum(cubeprod) fi;
end if;
end do;

gives me an error as well. What is the right syntax to achieve this?

My assignment is to plot 3 graphs when u0=65.70 and 95 and I thought I did my code properly but now I am getting weird errors

 

a0:=80;
a1:=-5;
b1:=-5*(3)^0.5;
w:=Pi/12;
k:=0.2;
u0:=65;

t=0:0.001:100;
c0=u0-a0-(k^2*a1-k*w*b1)/(k^2+w^2);
c1=(k^2*a1-k*w*b1)/(k^2+w^2);
d1=(k*w*a1+k^2*b1)/(k^2+w^2);
u=a0+c0*exp(-k*t)+c1*cos(w*t)+d1*sin(w*t);
plot(t,u,'r');

I am getting an error here that says Error, (in plot) unexpected options: [65., r] and I don't know how to fix this


legend('u(0)=65');


hold on;
u0=70;
c0=u0-a0-(k^2*a1-k*w*b1)/(k^2+w^2);
c1=(k^2*a1-k*w*b1)/(k^2+w^2);
d1=(k*w*a1+k^2*b1)/(k^2+w^2);
u=a0+c0*exp(-k*t)+c1*cos(w*t)+d1*sin(w*t);
plot(t,u,'-');

I am also getting an error with the '-' portion of my plot "Error, invalid uneval"

legend('u(0)=70');


hold on;
u0=95;
c0=u0-a0-(k^2*a1-k*w*b1)/(k^2+w^2);
c1=(k^2*a1-k*w*b1)/(k^2+w^2);
d1=(k*w*a1+k^2*b1)/(k^2+w^2);
u=a0+c0*exp(-k*t)+c1*cos(w*t)+d1*sin(w*t);
plot(t,u,'g');

I am getting an error yet again with my plot and this time it is "Warning, expecting only range variable u in expression t to be plotted but found name t"


legend('u(0)=90');

I have the function:   f(x,y) = 1/(sqrt(2*Pi)) * e-1/2(x^2+y^2)

I need to take the total derivative of this function in maple, but I don't know the syntax.

Hi, I'm new to Maple and was trying to use it to solve 3 equations with 3 unknowns, in terms of another 2 parameters. This is what I put in, and the error that came up:

solve({(1-x)/(1+b) = b*y, (1-y)(1-a)/(-a*b+1) = b*z, (1-z)(1-b)/(-a*b+1) = a*x}, {x, y, z}); 

Error, (in SolveTools:-LinearSolvers:-Algebraic) unable to compute coeff

I want to solve the equations to get x,y,z in terms of a,b but I don't understand the error coming up - have I done something wrong or is it because not all the variables appear in all of the equations? As there are 3 equations and 3 unknowns there is a solution, but I want to check the answer I found on paper with something (the algebra got a bit messy!)

Any help greatly appreciated! :)

I am trying to learn the <> notation to enter matrices and vectors. But I find this page very confusing

http://www.maplesoft.com/support/help/maple/view.aspx?path=examples%2FLA_Syntax_Shortcuts

it says:

but we see clearly the vertical bars are used to separate columns.

Isn't a column the thing that goes from the top to bottom and not from left to right in Maple LinearAlgebra?

 

For my research at my school, I need to plot the Schrodinger equation using my given wave function. I am having issues though as I am receiving an error telling me that I need to submit my argument in standard or parametric form.

 

restart;

schro := {[4*(x^2-1)*(diff(psi(x, y), x, x))/(x^2-y^2)+2*x*(diff(psi(x, y), x))-(y^2-1)*(diff(psi(x, y), y, y))-2*y*(diff(psi(x, y), y))+(-2/(x+y)-2/(x-y)+1)*psi(x, y)] = energy};

psi := proc (x, y) options operator, arrow; e^((-1)*.5*[2*x+2*y])+e^((-1)*.5*[2*x-2*y]);

plot3d(schro, x= 1..100, y = -1 ..1);

 

Unfortunately, I am unable to plot my function. I was able to substitute my psi(x,y) function into my schro equation, but I am unable to do much else. I want to plot my function such that my energy is represented in the z-axis as a relationship between x and y which are a specific coordinate system (conical coordintes). 

Greetings,

Maple 15 allows the following syntax

omega := sqrt(w0^2*(1+((z-zf)/z0)^2))

But it does not allow this one 

omega^2 := sqrt(w0^2*(1+((z-zf)/z0)^2))

Why is this so for functions and variables? Is there any way around this, I am really bugged by this issue. The Maple Math told me that the syntax was invalid so I had type the commands directly.

 

Hello, Im trying to do a jocobian

http://www.maplesoft.com/support/help/Maple/view.aspx?path=VectorCalculus/Jacobian

but when I try the example code

jacobian([rcos(t), rsin(t), r^2*t], [r, t])

 

i only get the output as 

 

jacobian([rcos(t), rsin(t), RandomMatrix(4, 4*density = .75, outputoptions = [shape = tringular*lowe])^2*t], [RandomMatrix(4, 4*density = .75, outputoptions = [shape = tringular*lowe]), t])

 

I want the output as a matrix as in the example url.

Thanks

Hi everyone,

I have to create a double wishbone suspesione model that can be edited by different users, only introducing some reference point values (called Hard Points). So I need some tool that, in some way, passes from the entered reference point values to the actual values of the bodyframes link. 

I found an already done model (from this link) that seems to be perfect to me because contains an attached Maple document that does exactly what I need working on the base of symbolic parameters applied to the MapleSim model. Now my problem is that I need to deeply change the model and so having the possibility to change the parameter set and insert for example nex parameters. But when I try to do that some problems come out with the Maple document: the syntax of the nex parameter set is different from the default (in the sense of already built in the model I downloaded) one and there are some syntax errors. Below I'll put a screenshot of the error.

 

under the XData code line, you can also see the syntax of one of the parameters that is very long and complicated: below I'll insert another image from which it can be seen the syntax with the original parameter set.

Now if you another idea for solving the initial problem, that would be great! Instead do you have an idea on how to fix the problem with the downloaded model? In my opinion there is a different MapleSim version problem, in the sense that could be thatn the model I downloaded has been done in another MapleSim version in which the parameter set syntax was different.

i want to solve an equation by fsolve but i cant assign a value as an input for next step!

please help me

s := fsolve(G), x = -1 .. 1     

s := .1449607418, x = -1 .. 1  

 a:=s+1  

Error, invalid input: subs received .1449607418, which is not valid for its 1st argument                  

Hello,

how to write a^tilde , a^check on maple

thank,

Gerard.

1 2 3 4 Page 1 of 4