MATLAB画复杂分段函数曲线。

26 visualizzazioni (ultimi 30 giorni)
我自己写了一段分段函数程序但是出错:
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)

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!