Placeholder symbol from single value to vector?

Hello,
I need to take a general function of two unknowns, 'a' and 'p', convert it to a polynomial expression in 'a' and then take a Chebyshev polynomial decomposition in 'p'.
So far, I have set up 'p' as a symbol, I discretize the function in 'a', and use 'polyfit' to find coefficients (dependent on 'p'). But then I want to change 'p' to a vector and I am getting the error that the 'subs' command will only work with 'old' and 'new' of the same length.
Does anyone know how to work around this in Matlab?
Thanks!

답변 (1개)

Walter Roberson
Walter Roberson 2012년 11월 14일

0 개 추천

What is the next step? If the further steps can be done numerically, then use matlabFunction() to convert the symbolic form to a function handle; you can pass vectors in as the arguments to the function so formed (operations will be element-by-element)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

ACE
2012년 11월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by