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

1 Ansicht (letzte 30 Tage)
Ayob
Ayob am 23 Mär. 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.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by