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!

Réponses (1)

Walter Roberson
Walter Roberson le 14 Nov 2012

0 votes

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)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Question posée :

ACE
le 13 Nov 2012

Community Treasure Hunt

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

Start Hunting!

Translated by