Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pVsk

The scalar product of two polynomial vectors


Description

If pMy is NULL, then the result is the sum of squares of the elements of pMx. Otherwise equals the scalar product ot the two given polynomial vectors.

Usage

pVsk(pMx, pMy=NULL)

Arguments

pMx

a polyMatrix class row or column vector

pMy

a polyMatrix class row or column vector

Details

The two vectors must have the same length.

Value

A polynomial class object, which is the sum of the elementwise product of the two vectors.

See Also

Examples

A <- polyMgen.d(2,2,rawData=ch2pn(c("-3","2+4*z","-z^2","1"),"z"))
A

pMcol(A,1) # ("-3" , "2 + 4*x")
pVsk(pMcol(A,1)) # "13 + 16*x + 16*x^2"

pMrow(A,2) # ("2 + 4*x" , "1")
pVsk(pMcol(A,1),pMrow(A,2)) # "-4 - 8*x"

# clean up
# rm(A)

polyMatrix

Infrastructure for Manipulation Polynomial Matrices

v0.3.1
MIT + file LICENSE
Authors
Tamas Prohle [aut], Peter Prohle [aut], Nikolai Ryzhkov [aut, cre], Ildiko Laszlo [aut] (<https://orcid.org/0000-0003-2324-8183>), Ulas Onat Alakent [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.