필터 지우기
필터 지우기

How to make operator for random matrix(matlab command is randn) ? please help me

조회 수: 1 (최근 30일)
How to make operator for random matrix(matlab command is randn) ? please help me

채택된 답변

Star Strider
Star Strider 2014년 5월 4일
편집: Star Strider 2014년 5월 4일
If you want to create normally-distributed random variables with a standard deviation of s and a mean of m with randn, this will work:
nrmrnd = @(m,s) m + s*randn;
or if you want a row r by column c matrix of them:
nrmrnd = @(m,s,r,c) m + s*randn(r,c);
  댓글 수: 4
SUMIT
SUMIT 2014년 5월 4일
sir,this is not an operator. In your first comment you give the operator.I need that type of operator. Please help....
Star Strider
Star Strider 2014년 5월 4일
This function should work:
xrndn = @(x) randn(length(x))*x(:);
Call it as:
y = xrndn(x);
for any vector x.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by