-1

If I have a vector a, which is not follow normal distribution. How do I transform them into normal distribution in MATLAB?

which means I create a new vector b that follow the normal distribution and have the information of a.

Peter Zhu
  • 1,154
  • 3
  • 15
  • 27
  • What do you mean by: *transform the data into normal distribution*? – knedlsepp Dec 30 '14 at 12:22
  • exactly yes, in matlab. – Peter Zhu Dec 30 '14 at 12:29
  • @PeterZhu - knedlsepp asked you for **clarification** on your statement. Simply saying "exactly" does not clarify anything. – rayryeng Jan 05 '15 at 15:33
  • @rayryeng,@knedlsepp, I mean I had a vector a, but not follow normal distribution, so I want to create a new vector b base on vector a witch follow normal distribution and represent the information of a. – Peter Zhu Jan 07 '15 at 01:32
  • possible duplicate of [Transform data to fit normal distribution](http://stackoverflow.com/questions/15549836/transform-data-to-fit-normal-distribution) – rayryeng Jan 07 '15 at 06:32

1 Answers1

0

I hope I get you right:

assume you have a vector a, and you would like to get a normal distribution that represents it.

[correct me if I am wrong]

>>a = randn(2); //your vector 
>>x=[-10:0.1:10]; 
>> y = gaussmf(x,[std(a) mean(a)]); //std(a)=sigma,mean(a)=mu
>> plot(x,y);
Day_Dreamer
  • 3,311
  • 7
  • 34
  • 61