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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by