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