【发布时间】:2014-08-28 16:46:22
【问题描述】:
我在 MatLab 中绘制符号函数时遇到了一些问题:例如,当我尝试使用 ezplot 绘制函数 f 时,其中:
f = 9/2 - ((2*x)/5 - 2/5)*(x/3 - 17/6) - x
我收到以下错误:
Error using findstr
Inputs must be character arrays.
Error in ezplot>ezplot1 (line 442)
if (isa(f, 'inline') && ~isempty(findstr(char(f), '=')))
Error in ezplot (line 145)
[hp, cax] = ezplot1(cax, f{1}, vars, labels, args{:});
Error in sym/ezplot (line 61)
h = ezplot(fhandle(f));
我尝试将符号函数 f 转换为 char 形式,但它返回一个类似的错误:
Error using findstr
Inputs must be character arrays.
Error in ezplot>ezplot1 (line 442)
if (isa(f, 'inline') && ~isempty(findstr(char(f), '=')))
Error in ezplot (line 145)
[hp, cax] = ezplot1(cax, f{1}, vars, labels, args{:});
感谢您的帮助!
【问题讨论】: