Question: why this proc dose't work proper ?

I use "cat" to concatinate greek letters but the output is not correct.test_cat.mw
 

restart; with(linalg); QPT := proc (q) local nc, qp, qpp, i, p, pp; nc := vectdim(q); qp := Vector(nc); qpp := Vector(nc); for i to nc do qp[i] := cat(p, q[i]); qpp[i] := cat(pp, q[i]) end do; return qp, qpp end proc

q := convert([alpha, beta], Vector); QPT(q)

q := Vector(2, {(1) = alpha, (2) = beta})

 

Vector(2, {(1) = palpha, (2) = pbeta}), Vector(2, {(1) = ppalpha, (2) = ppbeta})

(1)

``


 

Download test_cat.mw

 

Please Wait...