Making a Function file which calls another function file
古いコメントを表示
I have this gaussian2 m file:
function [g] = gaussian2(t, tau)
g = (1/sqrt(2*pi)) .*(1/tau) .* exp(- (t .^2) / (2 * tau^2));
end
I want to make another function m file of RMStau:
sqrt( integral( @(t) t.^2 .* gaussian2(t,tau), -inf, inf ) / integral( @(t) gaussian2(t,tau), -inf, inf ))
How do I make a RMStau m file as a function of my gaussian2 input?
Thanks
採用された回答
その他の回答 (1 件)
Walter Roberson
2016 年 4 月 8 日
function r = RMStau(tau)
r = sqrt( integral( @(t) t.^2 .* gaussian2(t,tau), -inf, inf ) / integral( @(t) gaussian2(t,tau), -inf, inf ));
カテゴリ
ヘルプ センター および File Exchange で Exponents and Logarithms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
