Making a Function file which calls another function file
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 8 Avr 2016
function r = RMStau(tau)
r = sqrt( integral( @(t) t.^2 .* gaussian2(t,tau), -inf, inf ) / integral( @(t) gaussian2(t,tau), -inf, inf ));
Catégories
En savoir plus sur Exponents and Logarithms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
