reduce number of variables !!
Show older comments
In the code bellow I want to organize variables of a1,a2,a3 into a vector. But unfortunately I faced lots of unexpected errors.
It would be kind of u to help me
Thanks in advance :)
syms a1 a2 a3
y=a1+a2+a3
z=matlabFunction(y)
a1=x(1)
a2=x(2)
a3=x(3)
x=[1 2 3]
w=z(x)
Answers (1)
Walter Roberson
on 29 Apr 2013
z = matlabFunction(y, 'vars', [a1, a2, a3]);
The result will take a vector.
Categories
Find more on Assumptions 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!