Making a Function file which calls another function file
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Walter Roberson
il 8 Apr 2016
function r = RMStau(tau)
r = sqrt( integral( @(t) t.^2 .* gaussian2(t,tau), -inf, inf ) / integral( @(t) gaussian2(t,tau), -inf, inf ));
Categorie
Scopri di più su Exponents and Logarithms in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
