Items tagged with vector vector Tagged Items Feed


I'm having an issue with this and I can't seem to fix it. Any help is greatly appreciated! Thank you in advance!!! For some reason mapleprimes won't let me upload the worksheet so I have pasted it below this message.


Kind regards.

Gambia Man

with(LinearAlgebra); UseHardwareFloats; with(plots); interface(rtablesize = infinity); with(Statistics);
L := 4; U := 1;
V := proc (x, y) options operator, arrow; piecewise((1/4)*L <= x and x <= (1/2)*L and (1/4)*L <= y and y <= (1/2)*L, U) end proc;
plot3d(V(x, y), x = 0 .. L, y = 0 .. L);

Vij := proc (ni, mi, nj, mj) local Xi, Xj; option remember; global U, L; Xi := 2*sin(ni*evalf(Pi)*x/L)*sin(mi*evalf(Pi)*y/L)/L; Xj := 2*sin(nj*evalf(Pi)*x/L)*sin(mj*evalf(Pi)*y/L)/L; return U*(int(int(Xi*Xj, x = (1/4)*L .. (1/2)*L), y = (1/4)*L .. (1/2)*L)) end proc;
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; Eigenvec := Eigenvectors(Hamil, output = ['values', 'vectors']), Hamil end proc;
SigFigEi := proc (Location::integer, SigFig::integer, VecSize::integer) local values, Eig, i; global HamilMat, OptK; Eig := Vector(VecSize); for i from 2 to VecSize do Eig[i] := HamilMat(i)[1][Location]; if evalf(Eig(i), SigFig+1) = evalf(Eig(i-1), SigFig+1) then OptK := i; break end if end do; values := evalf(Eig[i], SigFig); return values, OptK end proc;
BasisFunc := proc (location) local ni, mi, func, i, j, p, N, res, BasisSol; global HamilMat, L, OptK; p := evalf(Pi); N := OptK^2; ni := Vector(N); mi := Vector(N); for i to N do for j to OptK do res := (i+OptK-j)/OptK; if type(res, integer) = true then ni[i] := j; mi[i] := res end if end do end do; func := Vector(N); for i to N do func[i] := HamilMat(OptK)[2][i][location]*sin(ni[i]*p*x/L)*sin(mi[i]*p*y/L) end do; BasisSol := unapply(add(func[i], i = 1 .. N), x, y); return plot3d(BasisSol(x, y), x = 0 .. L, y = 0 .. L), func end proc;
Error, (in Vector) dimension parameter is required for this form of initializer

Hello all, first time posting here.  Anyways, I am trying to make a velocity vector plot from known u and v velocity components at known x and y locations i.e. at (0.1, 0.1), u=-0.5 m/s and v=0.43 m/s.  My calculations have been performed with a FORTRAN code, and the results output in matrix format.  What I am left with are 4 vectors: x location, y location, u velocity component, and v velocity component.  I know that MATLAB has a specific function, called "quiver," for creating a velocity vector plot from known data points (through the use of vectors containing those points).  I have trouble believing that there is not an equivalent function, however convoluted it may be, in Maple to create these plots.  I have tried to manipulate the fieldplot, vectorplot, and arrow functions to no avail.

Any ideas on how to create a velocity vector plot from known data points?  I am using Maple 18.

Here is a link to an example of what I am looking for:

Thanks, Brandon.

Hello, I am working on an elektromagnetism assignment, and have hit a slight problem with the Physics[Vectors] package. The cartesian unit vectors are set to i, j and k. but at my school we have always used x, y and z for both the cartesian unit vectors and the cartesian coordinates. Is there a way to change this so that i am able to use _x, _y and _z istead?


P.S. This is my first post so sorry if it is badly done.

Hi everyone,

I wanted to know if it was possible to store symbolic variables in a vector because I have a function of 10 variables which I want to write with Σ, Π and A(l), A being my vector of symbolic variables...

Thank you for your time



Vectors are defined by a lenth and an angle.

The arrow command wants me to give it a starting point and an endpoint in coordinates, for example:



gu := arrow([5, 10], [15, 20], .2, .4, .1, color = green)

I'm dealing with vectors from electrical circuits, so the information I have would be the lenth of the vector, and an angle given in degrees (which I could convert to radians if needed for the plot).

The goal is to plot all the vectors in the circuit on the same display so that it can be seen how they are in relation to each other, and to visualise the solution. This means I would need to find out the endpoint of the arrows to start the next arrow at that location with its angle in reference to the same axis. Does it make sence? I'm not sure about the wording of this.

Here's a picture of a calculated vector lenth and angle:

So, the -45 degrees would need to be in reference to the y-axis for example, then the next vector can be placed at lets say perpendicular in reference to the vector sol_1, starting at its endpoint.

The only other way I have to draw this, excluding doing it by hand, is using the object tools from microsoft word, and to be honset I dislike using word for math stuff. I would much rather learn the syntax for Maple to do this.


I hope someone knows what I mean, Please ask if somethig is unclear,








I want to make a dot product like

Eq6 := (sum(delta[i].v[i], i = 1 .. 3)).(sum(delta[j].w[j], j = 1 .. 3))

and get the complete result like

Eq7 := v[1].w[1]+v[2].w[2]+v[3].w[3]

but instead I get

Eq6 := ((Vector(3, {(1) = 1, (2) = 0, (3) = 0})).v[1]+(Vector(3, {(1) = 0, (2) = 1, (3) = 0})).v[2]+(Vector(3, {(1) = 0, (2) = 0, (3) = 1})).v[3]).((Vector(3, {(1) = 1, (2) = 0, (3) = 0})).w[1]+(Vector(3, {(1) = 0, (2) = 1, (3) = 0})).w[2]+(Vector(3, {(1) = 0, (2) = 0, (3) = 1})).w[3])

Is there a way to force the dot product operation all the way?

I define unit vectors as

delta[1] := Vector(3, {(1) = 1, (2) = 0, (3) = 0})

delta[2] := Vector(3, {(1) = 0, (2) = 1, (3) = 0})

delta[3] := Vector(3, {(1) = 0, (2) = 0, (3) = 1})

Then I manually take the dot product as

Eq3 := delta[1].delta[1]+delta[1].delta[2]+delta[1].delta[3]+delta[2].delta[1]+delta[2].delta[2]+delta[2].delta[3]+delta[3].delta[1]+delta[3].delta[2]+delta[3].delta[3]

and get

Eq3 := 3

But when I do this

Eq4 := sum(sum(delta[i].delta[j], j = 1 .. 3), i = 1 .. 3)

I get

Eq4 := Vector(3, {(1) = Vector(3, {(1) = 1, (2) = 1, (3) = 1}), (2) = Vector(3, {(1) = 1, (2) = 1, (3) = 1}), (3) = Vector(3, {(1) = 1, (2) = 1, (3) = 1})})

How can I make Maple give me the first result using the sum command?


Here the potential of maple 2015 to the quantitative study of the decomposition of a vector table is shown in two dimensions. Application for the exclusive use of engineering students, which was implemented with embedded components.


Lenin Araujo Castillo

Archivo Corregido:  Decomposició

Hi All,


I am working on modeling dynamics for a robot. It requires a write some long expressions into C++.  When I do it, it has some strange problem in creation of C++ code from a vector.

Here is an example of the problem. I have a multivariable polynomial term, I using coeffs to get its coefficients and corresponding unevaluated variables, which works fine. But I can't convert the vector into C++

Ca := coeffs(term, [W, Rf, Rr, dxf, rcf, rcr], 'L'):

L;                           Rf, Rr, dxf

C(L, resultname="L11", output="dSpDdx1.cpp");

Error, (in Translate) options [Rr, dxf] not recognized.

I don't know why maple thought the unevaluated variable Rr and dxf are options instead of the vector I want to convert into c++. Does any one know what I did wrong?


Thanks in advance.



How to generate all basis of a set? (rather an the one basis that basis generates)



I wish to express a tensorial equation or expression a simplified vector form.


In the worksheet attached, I was trying to express Maxwell Equations in the familiar vector form from the tensorial form, using the F[mu,nu] tensor.


But I cannot achieve the familiar tensor form. If someone can give a hand, it would help me a lot.



1. how to eliminate the diff(*(x,y,z),x) terms in an expression, "*" means any function which have independent variables x,y,z?

2. how to get the gradient of a vector, which should be a tensor?

Hi all

Assume that we have following special matrix(Namely ATilde) for arbitrary vectore  z=[a0,a1,a2,a1*,a2*]:

and we want to use this as a general function for other arbitrary vector. is ther any way?

for example z1=[x,y,t,s,u]?

thanks for any help

best wishes


Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Maple function plot allows to build a linear plot for two vectors, when one vector contains X coordinates, another -- Y coordinates (similar to plot below):

Is it possible to build such a plot for several Y-vectors like this:



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