# How can I generate a pseudo random column vector V

3 Ansichten (letzte 30 Tage)
Ihor am 5 Dez. 2022
Kommentiert: Jon am 6 Dez. 2022
for N = [1 2 5 10.^[ 1 : 5 ] ]
V = rand( N, 1 ) ; % I'm not sure if it should look like this
end
I have this cycle, how can I generate a pseudo random column vector V of varying length N (using this cycle)
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Antworten (1)

Jon am 5 Dez. 2022
Yes this will make a random column vector of length N at each iteration.
The values will be uniformly distributed between 0 and 1. If you want them normally distributed use randn.
##### 2 Kommentare1 älteren Kommentar anzeigen1 älteren Kommentar ausblenden
Jon am 6 Dez. 2022
Glad that helped. If that answered your question please accept the answer so that others who might have a similar problem will know that an answer is available.

Melden Sie sich an, um zu kommentieren.

### Kategorien

Find more on Multivariate Normal Distribution 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!

Translated by