make a matrix with elements that are under affected by the element number

1 回表示 (過去 30 日間)
Ayob
Ayob 2019 年 3 月 23 日
Hi everyone
I want to make a matrix that each one of its element value is related to the element number.
My matrix is given below:
A=[symprod(1+2*p,p,0,0) symprod(1+2*p,p,0,1) symprod(1+2*p,p,0,2) ... symprod(1+2*p,p,0,8)];
And, I want to shorten the above code. For example, if it was possible in Matlb I could write the following code:
A=symprod(1+2*p,p,0,(0:8))
Unfortunately, matlab do not recognize the current code. Is there any other way to write a shortened code for the matrix A.

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by