MATLAB画复杂分段函数曲线。

26 次查看(过去 30 天)
我自己写了一段分段函数程序但是出错:
func=@(t)(t<=1).*(60*(log(8/t+t/4))/sqrt(Ee))+(t>=1).*(120*pi/(t+1.393+0.667*log(t+1.444))/sqrt(Ee))
Ee=(2.94+1)/2+(2.94-1)/2*(1+12/t).^(-0.5)
fplot(func,[0,8])
xlabel('t');ylabel('Z0');
错误是:未定义函数或变量 't'。
出错 Untitled (line 4)
Ee=(2.94+1)/2+(2.94-1)/2*(1+12/t).^(-0.5)

采纳的回答

AG百家乐新登录网址【359663.tv】
仅提供参考!
Ee=@(t)(2.94+1)/2+(2.94-1)/2*(1+12/t).^(-0.5)
func=@(t)(t<=1).*(60*(log(8./t+t/4))./sqrt(Ee(t)))+(t>=1).*(120*pi./(t+1.393+0.667*log(t+1.444))./sqrt(Ee(t)))
fplot(func,[0,8])
xlabel('t');ylabel('Z0')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!