generarting vector or standard normal in matlab

조회 수: 1 (최근 30일)
rakesh kumar
rakesh kumar 2023년 6월 10일
편집: rakshit gupta 2023년 6월 12일
iI want to generate random variables z_i, where z_ is a standard normal varible (i,e. with mean zero and variance 1) and if I have a vector z=[z_1 z_2..........z_n] ' then theorectically zz^T should give an identity matrix. how can I generate z in matlab so that z *z^T is an identity matrix. where z^t is transpose of z

채택된 답변

rakshit gupta
rakshit gupta 2023년 6월 10일
편집: rakshit gupta 2023년 6월 12일
One possible way to generate a random vector z in MATLAB such that z * z.' is an identity matrix is to use the randn function to generate a vector with normally distributed random variables, and then normalize it so that its length is equal to 1.
You can refer to randn and norm for normalizing the vector.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by