Can Any one help with this plz

1 Ansicht (letzte 30 Tage)
Nasir Qazi
Nasir Qazi am 14 Mär. 2012
*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

Antworten (1)

Walter Roberson
Walter Roberson am 14 Mär. 2012
lnP(m+1) = lnp(m) + (rand() * 2 - 1) * allowable_change;
  1 Kommentar
Nasir Qazi
Nasir Qazi am 14 Mär. 2012
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 .

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by