ans = 
syms to another .m file
显示 更早的评论
How do you export your syms equation to a new/different .m file to be able to use the equation with parameters.
采纳的回答
更多回答(1 个)
Call the other .m-file with the syms-equation (or function) as input argument.
syms x
f = x.^2;
result = fun(f)
function result = fun(f)
syms x
result = subs(f,x,2);
end
类别
在 帮助中心 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
