MATLAB画复杂分段函数曲线。

29 views (last 30 days)
我自己写了一段分段函数程序但是出错:
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)

Accepted Answer

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')

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!