Can Any one help with this plz

조회 수: 1 (최근 30일)
Nasir Qazi
Nasir Qazi 2012년 3월 14일
*lnP(m+1)- lnP(m) < allowable change*
% where lnP(m+1) , lnP(m) , allowable change is given
% its should do this
* lnP(m+1) = lnP(m) +/- allowable change*
% +/- is causing my head-in , How can I write this in Matlab

답변 (1개)

Walter Roberson
Walter Roberson 2012년 3월 14일
lnP(m+1) = lnp(m) + (rand() * 2 - 1) * allowable_change;
  댓글 수: 1
Nasir Qazi
Nasir Qazi 2012년 3월 14일
for +/- means in case of '+' the give me top value and in case of '-' this will give me lower value ' not the random value' so lnP(m+1) has 2 values one is top value and one is lower that's what I want .

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by