Placeholder symbol from single value to vector?
4 views (last 30 days)
Show older comments
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!
0 Comments
Answers (1)
Walter Roberson
on 14 Nov 2012
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)
0 Comments
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!