matlab解决ezplot的function has no real value

 时间:2026-02-13 21:30:22

1、定义一个符号变量;

syms x;

matlab解决ezplot的function has no real value

2、定义一个符号函数;

 f=log((1 - x^2)^(1/2)/(x - 1))

matlab解决ezplot的function has no real value

3、采用ezplot画图像;

ezplot(f);

matlab解决ezplot的function has no real value

4、会跳出下面错误;

Warning: Cannot plot log((1 - x^2)^(1/2)/(x - 1)):

This function has no real values. 

> In ezplot>ezplot1 at 479

  In ezplot at 145

  In sym.ezplot at 61 

Error in ezplot>ezplot1 (line 421)

    error(nargchk(4, 6, nargin, 'struct'));

Output argument "hp" (and maybe others) not assigned

during call to

"D:\MATLABR2012b\toolbox\matlab\specgraph\ezplot.m>ezplot1".

Error in ezplot (line 145)

                [hp, cax] = ezplot1(cax, f{1}, vars,

                labels, args{:});

Error in sym/ezplot (line 61)

   h = ezplot(fhandle(f));

1、分析:主要是因为我们的函数值在matlab的运算机制中不是是实数。

方法:改画图指令为

ezplot(real(f));

matlab解决ezplot的function has no real value

2、查看结果如图。

matlab解决ezplot的function has no real value

  • 电路仿真软件multisim教程
  • multisim10.0怎么设置为中文
  • multisim中怎么把页面扩大
  • multisim使用:[5]频率响应或波特图
  • Multisim怎么放置稳压二极管?
  • 热门搜索
    来电秀怎么设置 适合圆脸女生的发型 男士发型图片大全 怎么撸管最舒服 西安外国语大学怎么样 适合的发型测试软件 怎么做小抄 怎么把图片内存变小 怎么装修房子 酒喝多了怎么解酒