Symbolic expressions inside of array
1 view (last 30 days)
Show older comments
Bram van Eijnatten
on 14 Apr 2021
Commented: Bram van Eijnatten
on 14 Apr 2021
syms x
f(x) = x^2;
g(x) = x^3;
a = [f,g];
Imagine I have a code like this, and I wish to evaluate only f for a certain value, but not bring outside of the array. How can I do this? For instance, if now ask for a(3), matlab will output [9,27]. However, I want only want 9.
0 Comments
Accepted Answer
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!