Items tagged with vector vector Tagged Items Feed

I have the following problem consisting of multiple seteps.

I have a vector equation consisting of n equations with n parameters (a[n]). Usually the n <= 15. As example data I will use the case n=4.

equations := Vector[column]([ a[1], a[2], a[3],a[4]])-Vector[column]([ b[1], b[2], b[3],b[4]])=0;

The first thing I want to create is a matrix with a format 2^n x n (here: rows=16 by columns=4). The matrix only consists of ones and zeros which contains all possible combinations of ones and zeros. E.G. for n=4

subsMatrix := Matrix([[ 0 , 0 , 0 , 0 ],[ 1 , 0 , 0 , 0 ],[ 0 , 1 , 0 , 0 ],[ 0 , 0 , 1 , 0 ],[0 , 0 , 0 , 1],[1, 1 , 0 , 0],[1, 0 , 1 , 0],[1, 0 , 0 , 1],[0, 1 , 1 , 0],[0, 1 , 0 , 1],[0,0,1,1],[1, 1 , 1 , 0],[1, 1, 0 , 1],[1, 0 , 1 , 1],[0, 1 , 1 , 1],[1, 1 , 1 , 1]]);

Question 1: How do I create such a matrix for the general case? I have absolutely no idea how to achieve this with Matple

The next thing I want to do is to use the rows as substitution equations for the a[i] values, only if the value of the subsMatrix is 0. E.G. in the first case I want to set a[1]=a[2]=a[3]=a[4]=0, then a[2]=a[3]=a[4]=0, then a[1]=a[3]=a[4]=0, and so forth and save the equation as a new equation

I tried the following:

rows:=RowDimension(subsMatrix);

columns:=ColumnDimension(subsMatrix);

for i from 1 by 1 while  i<=rows do

                 subsEquations[i]:=equations

                 for j from  1 by 1 while  j<=columns do

                     if subsMatrix[i,j] =0 then

                          subsEquations[i]:= subs(a[j]=subsMatrix[i,j],subsEquations[i]) 

                     else      

                          #do nothing if the value in the subsMatrix[i,j]=1

                     end if

                 end do:    

end do:

Question 2: What is my error? Maple says the loop is indeterminate. But I don't see why it is not working.

 


I would be thankful if someone could help me out. I am open to other kind of strategies to this problem :).

I am quite a new user of Maple 2016.

I intend to plot complex numbers as vectors (Phasors), with diferent relationsships between them. I would like to use parameters and modify them e.g with a slider. I can't find how to do it. 

 

For example:

V1=1*cos(delta)+j*sin(delta)

Ve=0.5*cos(alfa)+0.5*j*sin(alfa)

V2=Ve+V1

V2=1+j0

V12=V1-V2

I=V12/(Zcos(beta)+jZsin(beta))

I would like to be able to see those vectors, employing alfa and beta as parameters (e.g between -pi and pi)

 

Any ideas on how to plot that? Maybe Maple is not the right tool to do it. Is there any specific to plot interactive phasors?

Thanks

Dear Community,

I generate two vectors and try to plot them one vs. the other ( ZPLOT vs. PREDS )  with the pointplot command. Unfortunately I get the message "points are not in the correct format" ... Probably a minor error, but it is unclear what format Maple expects here? What do I do wrong?

Tx. for the kind help in advance,

best regards

Andras

P.S. Maple file attached

Z_DAK_PROC.mw

The array is:

N := vector (20, x -> y[x]);

The maple creat the array

The other is:

N := vector (20, x -> y[x]);

Where y[x] are a list 

I do plot 

plot( M,N);

But the plot is many lines with the value of the array, i want the fist coordenates of the N with fist coordenate for the M in points or line.

Thanks 

Hello,

a=number      b=number

=maple("Qm:=x->(diff(KelvinBei(0,x),x)*psi2(x)-(diff(KelvinBer(0,x),x)*psi1(x)))/&1";B11)

=maple("Qv:=x->(&1*psi2(x)-(&2*psi1(x)))/(&3*&4)";B6;B7;B2;B11)

=maple("Fm:=x->(Qv(x)+(&1*Qm(x)))/2";B3)

I need abs(max(Fm(x))) and abs(min(Fm(x))) values of function Fm(x), locals, for a<x<b in excel.

Now I use a vector to do this, but I need an exact values not an approximation of a fuction evaluated with n values of x.

what I do:

=maple("seq(i,i=&1..&2,&3)";N2;N3;N4)

=maple("A:=&1";N5)

=maple("G:=map(g->evalf(eval(Fm(x),x=g)),[A])")

=maple("max(abs~(G))")

Someone can help me??

Hello,

I have an array/vector of values as results of a function:

=maple("Fm:=x->(Qv(x)+&1*Qm(x))/2";B3)

=maple("G:=map(g->evalf(eval(Fm(x),x=g)),[A])")

Now I need the maximum of absolute values of G!!

=maple("max(G)") I have maximum, but I want =maple("max(abs(G))") But there is an error in this expression!!

 

 

I'm working in a tridimensional euclidean space, with vectorial functions of the type:

Fi(t)=<fix(t),fiy(t),fiz(t)>

Fi'(t)=<fix'(t),fiy'(t),fiz'(t)>

The two odes are of the type:

ode1:=K1*F1''(t)=K2*F2(t)&xF3(t)+...

While there are other non-differential vectorial equations like:

eq1:=K4*F4''(t)=(K5*F5(t)&x<0,1,0>)/Norm(F6(t))+..., etc

 

Is there a way i can input this system in dsolve with vectors instead of scalars? And without splitting everything into its 3 vectorial components? I can't make maple realize some of the Fi(t) functions are vectors, it counts them as scalars and says the number of functions and equations are not the same.

 

Thank you!

I am using a stoiciometric matrix to generate a system of differential equations (this makes them easier to check). There are 13 chemical species and 16 reactions so I need to make and display vectors of length 13 and 16; as well as a 13x16 matrix.

When I make Vectors of this size they don't get displayed; I just get information about the vector (Fortran order etc) and this is the same for the matrix.

How do i make/edit/display Matrixes nd Vectors of this size?

Consider the list [x,y,z], say. Does there in Maple exist some fundamental function for querying the position in the list of x,y, and z, respectively? I am unable to locate any such. Such a function can, of course, be constructed, an example being the following:

listPos := (l::list) -> table(zip(`=`,l,[$(1..nops(l))])):
pos := listPos([x,y,z]);
pos[x],
pos[y],
pos[z];

But that seems unsatisfactory. The same question concerning Vectors: Consider Vector([x,y,z]), say. Here, the following code, say, will perform the task:

VectorPos := (V::Vector) -> table([map(rhs = lhs,op(2,V))[]]):
pos := VectorPos(Vector([x,y,z]));
pos[x],
pos[y],
pos[z];

PS: Of course, list and Vectors can be converted into one another, so any one of the codes above can in practice be used to perform both tasks.

Hello,

How can I do to suppress all the complex components of a vector ? Is there a simple code to do this?

For example, I would like to replace the complex components with zero.

If the considered vector is a:= [2+I,2,5], i would like to obtain after modifications amod:= [0,2,5] ou amod  [Nothing,2,5]

VectorWithComplexComponents.mw

Nota :

The origin of my issue is to be able to plot points with the following syntax :

pointplot([tp,xp,symbol = solidcircle,color=black,symbolsize = 10): where xp is a vector with, sometimes, some complex components. 

I would like to plot the points only for the real components of xp

Thanks a lot for your help

 

 

Good day everyone, I would like to know how to work this out in a code on maple:
-I have some vectors (K(1),K(2),K(3) etc) similar to this:

K(1)=[A B C]

-I want to sort all of them by the value of C, but when I use the sort built in comand the program return a answer based on K index instead a sorting based on C.

Any ideas would be higly apreciated.

Hello everyone, I recently learned how to plot vector fields using maple. So far, I know of two ways using VectorField(output = plot) and fieldplot3d(some_vectorfunction). My problem is that, it seems these two functions yield slightly different plots, fieldplot3d seems to give a more accurate depiction of the actual vector field, whereas the other function gives a similar ouput but in a more 'sloppy' form. Is this normal? Or am I doing something wrong?

Here are the two plots done by each function:

fieldplot3d:

Plot done by 'fieldplot3d' function.

VectorField(output = plot):

Plot done by 'VectorField(output = plot)' function.

Hey,


I want to assign a value to a symbol stored in a vector. I know the position of the symbol in the vector. Is there an easy way to do this?

Here to illsutrate my problem:

restart:

vec:=<a,b,c>:

vec(1):=1;    # expected result: a:=1

vec := Vector(3, {(1) = 1, (2) = b, (3) = c})

(1)

a;            # expected result: 1

a

(2)

 

 

Download point_to_element.mw

 

 

A := Vector([1, 2, 3])

solve(2*A = 5+x, {x})

 

can anyone help me why i am having proble to solve for x?

Thanks

Hello


I am new to maple. If i have a vector from 0 to 1000 every 10 step (in matlab it is sth like this x=0:10:1000) can anyone help me how to do this in maple?

thanks

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