45 Reputation

4 Badges

3 years, 84 days

MaplePrimes Activity

These are questions asked by kiraMou

FourTrans.mwI am wondering if I can calculate this Fourier Transfrom analytically using Maple:

Hey everyone!

I have a complex function stored in a file (Comp-func.txt). The function is continues everywhere on the real axis (X-axis.txt). However, its log shows a jump somewhere close to x=-1.5. I would like to understand how Maple interprets this "jump" and how to avoid such numerical artifact.

thank you.



Hey everyone!

I am trying to merge two vectors into a matrix. Let us say that both of the vectors has only one line and 4 columns:
Therefore, the matrix that I am trying to get should have this form:
Thanks in advance!

restart; N := 100; dx := evalf(2*Pi/N)





f1 := proc (x) options operator, arrow; sin(x) end proc;

proc (x) options operator, arrow; sin(x) end proc


DiscX := proc (N, dx) local i, xv; xv := Vector(N); for i to N do xv[i] := evalf((i-(1/2)*N-1)*dx) end do; return xv end proc:

Xfun := proc (f1) local i, xa1, xa2; xa1 := Vector(N); xa2 := Vector(N); for i to N do xa1[i] := evalf(subs(x = a[i], f1(x))) end do; return xa1 end proc:

IntNum := proc (N, a, c) local i, xv1; xv1 := Vector(N); for i from 2 to N-1 do xv1[i] := evalf((1/2)*(a[i]-a[i+1])*(c[i]+c[i+1])) end do; return xv1 end proc:

a := DiscX(N, dx); a[1]; a[100]

a := Vector(4, {(1) = ` 1 .. 100 `*Vector[column], (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})






c := Xfun(f1); c[1]

c := Vector(4, {(1) = ` 1 .. 100 `*Vector[column], (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})




k := IntNum(N, a, c)

k := Vector(4, {(1) = ` 1 .. 100 `*Vector[column], (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})


plot([seq([a[i], k[i]], i = 2 .. N)], style = line, title = typeset("Integ_of_sin(x)"), titlefont = [times, bold, 30]);




Hey everyone!

I would like to plot the integral of a discrete function. For simplicity, I choose the function sin(x) between –Pi and Pi, which has as an integral -cos(x). I tried to implement that in Maple using the Trapezoidal rule, but the result is simply wrong. Any help would be much appreciated!

Hello everyone !,

I would like to generate two random complex vectors (x1 and x2) several time and I want to check how these two vectors (j iteration) close to their previous values (j-1 iteration): abs (x1(j)-x1(j-1)) < 10^-4 and abs (x2(j)-x2(j-1)) < 10^-4. Therefore, I want that my program stop when this criteria is satisfied for x1 and x2 simultaneously.

I know how to check that for one element of the vector but not all the elements of the vector.

1 2 3 Page 1 of 3