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

1 vue (au cours des 30 derniers jours)
Ayob
Ayob le 23 Mar 2019
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.

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by