how can use randn function with any matrix and negative or not integers numbers ??
1 view (last 30 days)
Show older comments
if we have matrix X with size (1*10) for example, how can achieved new matrix (Y for example) with using gaussian equation?
x= [ 1.542 -2.551 0.657 6.337 -0.678 3.758 8.421 -4.215 0.854 -0.924 ]
0 Comments
Answers (1)
Star Strider
on 16 Sep 2021
I am not certain what the desired result is.
One possibility —
x = [ 1.542 -2.551 0.657 6.337 -0.678 3.758 8.421 -4.215 0.854 -0.924 ];
df = fitdist(x(:), 'Normal')
xv = linspace(min(x), max(x));
Probabilities = [x; normpdf(x,df.mu,df.sigma)]
figure
plot(xv, normpdf(xv,df.mu, df.sigma))
hold on
plot([x;x], [0;1]*normpdf(x,df.mu,df.sigma), '--k')
hold off
grid
legend('Normal Distribution','Mapped x-Values', 'location','best')
Make appropriate changes to get the desired result.
.
0 Comments
See Also
Categories
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!