代码:

x=linspace(-5,5,100);
y=[];
for x0=x;
if x0>0
    y=[y,1/2*log(x0+sqrt(1+x0.^2))];
else
    y=[y,(x0+sqrt(pi))/exp(2)];
end
end
plot(x,y)
结果:

相关文章:

  • 2021-11-03
  • 2021-05-03
  • 2021-12-16
  • 2021-10-09
  • 2021-11-21
猜你喜欢
  • 2021-10-19
  • 2021-07-07
  • 2022-01-01
  • 2021-12-16
  • 2021-10-09
  • 2021-11-08
  • 2021-12-10
相关资源
相似解决方案