How to simply multiply a symbolic variable into a matrix?
Show older comments
I have a matrix of numbers that is calculated using a formula that includes a symbolic variable.
A(n+1,m+1) = u*Bnm*A(n,m+1) - Bnm_over_nm1m*Anm2m;
u is the only symbolic variable present here. I get the expected 'can't convert syms to double' error here. Right now I have everything implemented as if u were actually a number (aside from its initial definition). What could I do to make this formula possible with minimal architecture changes?
I'm aware of symbolic arrays, but it's important that I'm able to perform calculations with more arrays later on and the A matrix ends up being lower triangular.
Currently to get this running I'm just substituting a made up value for u. I'd like to be able to see where u is being used in further calculations.
Accepted Answer
More Answers (1)
Paul
on 22 Nov 2023
0 votes
I'm pretty sure that if u is to be symbolic then so must be A (unless you make A into a cell array, which is probably not the way to go). What's the objection making A symbolic?
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!