generating a randn values to study the effect of an input parameter on output parameter
Afficher commentaires plus anciens
Hello all,
I have an input parameter alpha, and I want to study the variation effect of this parameter on an output parameter Output_par. What I did is the following, I tried to change the alpha using the randn function to generate a gaussian.
I have actually 2 questions :
1-When am using the randn function in the following way
alpha=alfa(iii)+5*randn/100;
am I changing the alpha value 5 percent? if not can someone
explain to me what it means using it this way ?
2-once I get all the 10000 values of my output_par, do I have
to add the 5 percent to the std of the gaussian or not ?
for iii=1:10000
tic
alpha=alfa(iii)+5*randn/100;
S_f=(2*mr-5) * (alpha).^2
Tu_f=S_f.*max_lid_beta_f_int;
B=S_f.*Gamma_f;
% for i=1:bheem;
EC_f=final_beta_fine.*B;
[number_line,number_column]=size(EC_f);
EC_f_integrated=[];
transposee_EC_f=EC_f';
for i=1:number_column
X=altitude;
Y(i,:)=transposee_EC_f(i,:);
Y=Y(i,:);
EC_f_int=trapz(X,Y);
EC_f_integrated=[EC_f_integrated EC_f_int];
end;
Output_par=[Output_par EC_f_integrated];
toc
end
thanking you in advance,
Réponse acceptée
Plus de réponses (2)
Fangjun Jiang
le 8 Sep 2011
0 votes
1. No, it's not. randn could vary from large negative to large positive although the possibility of a large number is small.
Y = randn returns a pseudorandom, scalar value drawn from a normal distribution with mean 0 and standard deviation 1.
2. You probably have to answer yourself. What is the purpose of the code?
LE FOU
le 8 Sep 2011
1 commentaire
Fangjun Jiang
le 8 Sep 2011
1. No and No. Please check a text book. Also, remember you have alfa(iii) involved.
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!