how can use randn function with any matrix and negative or not integers numbers ??
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Star Strider
il 16 Set 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 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!