How to load an indexed vector into a symsum?
12 views (last 30 days)
Show older comments
I would like to load specific values into the symsum of each step, however it seems like i can't use the index of the sum as an index in my vector.
alpha=[1:100]; %example
syms D t
S1=symsum(alpha(n)*exp(-D*alpha(n)*t),n,1,100);
Error using sym/subsindex (line 836)
Invalid indexing or function
definition. Indexing must follow
MATLAB indexing. Function arguments
must be symbolic variables, and
function body must be sym
expression.
I understand that Matlab see n as a symbol and the cant use it in the alpha(n) vector. How can i circumvent this bump?
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Calculus 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!