Compute all third degree monomials out of a given vector

2 ビュー (過去 30 日間)
Mohamed Abdalmoaty
Mohamed Abdalmoaty 2019 年 5 月 30 日
編集済み: Matt J 2019 年 6 月 4 日
Suppose you are given a vector
How can one effieciently construct a vector containing all third degree monomials of the vector entries? That is a vector of dimension containing the entries .
  5 件のコメント
Mohamed Abdalmoaty
Mohamed Abdalmoaty 2019 年 6 月 3 日
編集済み: Mohamed Abdalmoaty 2019 年 6 月 3 日
Are you counting and as two different monomials? (or and ) ...These count as 1 for me.
Matt J
Matt J 2019 年 6 月 4 日
For me too.

サインインしてコメントする。

回答 (1 件)

Matt J
Matt J 2019 年 6 月 3 日
編集済み: Matt J 2019 年 6 月 4 日
p=eps(u);
p(u<0)=-p(u<0);
logresult = nchoosek(log(u+p),2)*[3 2 1 0 ; 0 1 2 3];
result= real(exp(logresult))

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by