【发布时间】:2021-11-04 04:22:32
【问题描述】:
我想使用一个方程式,该方程式使用内联函数存储在变量中,但我收到错误“检查不正确的参数数据类型或在调用函数'coeffs'时缺少参数”。 '。这是我想要的代码和输出。 MATLAB
syms x;
eq = input('Enter Equation Of Divisor: ','s');
p = inline(eq);
c = coeffs(p);
disp(c);
> Enter Equation: x-4
> [-4,1]
谢谢。
【问题讨论】:
-
如果您阅读了 MATLAB 的帮助部分,建议不要使用内联函数,而是使用其他匿名函数。
标签: matlab printf equation coefficients