trying to use toeplitz matrix with symbolic math toolbox

2 views (last 30 days)
I am trying to create the symbolic equivalent of the following expression:
rhomat = toeplitz(rho.^(0:c-1));
That is, instead of using a scalar value for rho, I would like to use a symbol, and produce a symbolic matrix with elements {1, rho, rho^2, ...} along the respective diagonals.
I tried:
syms rho
rhomat = feval(symengine,'linalg::toeplitz',c,[rho.^(c-1:-1:1) rho.^(0:c-1)]);
This produces the following error: ??? Error using ==> mupadengine.mupadengine>mupadengine.feval at 144 MuPAD error: Error: expecting a list of entries for the diagonals [linalg::toeplitz]
I have tried a number of variations, including replacing the expression in brackets with a string using char(A) where A = symbolic vector generated by the expression. But no luck.
Any idea what I am doing wrong? Thanks very much.

Answers (0)

Community Treasure Hunt

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

Start Hunting!