/ concept-collection / barycentric-rational
Sign in
concept-collection / barycentric-rational
barycentric-rational / src / matlab / lib / evalexpr.m
8 lines · 180 BBlameHistoryRaw
1function y = evalexpr(expr, x)
2%EVALEXPR Evaluate a user-typed expression in the variable x.
4y = eval(expr);
5if numel(y) == 1 && numel(x) ~= 1
6 y = y * ones(size(x));
7end
8end
moveopenescclose