Prev: "The requested evaluator is not currently defined"
Next: A problem with derivative InterpolatingFunction from NDSolve
From: stpatryck on 14 Dec 2008 07:40 In[111]:= npv[cf0_, cf1_, cf2_, cf3_, cf4_, cf5_] := -(cf0) + cf1*(1/((1.12)^1)) + cf2*(1/((1.12)^2)) + cf3*(1/((1.12)^3)) + cf4*(1/((1.12)^4)) + cf5*(1/((1.12)^5)); (* Plan A NPV *) npv[3600000, 0, 0, 0, 0, 7000000] SetDelayed::write: Tag Real in 1304.33[cf0_,cf1_,cf2_,cf3_,cf4_,cf5_] is Protected. >> Out[111]:= 1304.33[3600000, 0, 0, 0, 0, 7000000]
From: dimitris on 15 Dec 2008 07:41 On 14 =C4=E5=EA, 14:40, stpatryck <stpatr...(a)gmail.com> wrote: > In[111]:= npv[cf0_, cf1_, cf2_, cf3_, cf4_, cf5_] := -(cf0) + > cf1*(1/((1.12)^1)) + cf2*(1/((1.12)^2)) + cf3*(1/((1.12)^3)) + > cf4*(1/((1.12)^4)) + cf5*(1/((1.12)^5)); > > (* Plan A NPV *) > npv[3600000, 0, 0, 0, 0, 7000000] > > SetDelayed::write: Tag Real in 1304.33[cf0_,cf1_,cf2_,cf3_,cf4_,cf5_] > is Protected. >> > > Out[111]:= 1304.33[3600000, 0, 0, 0, 0, 7000000] Start a new session. In[8]:= Quit[] In[3]:= npv[cf0_, cf1_, cf2_, cf3_, cf4_, cf5_] := -cf0 + cf1*(1/1.12^1) + cf2*(1/1.12^2) + cf3*(1/1.12^3) + cf4*(1/1.12^4) + cf5*(1/1.12^5); npv[3600000, 0, 0, 0, 0, 7000000] Out[4]= 371988. Dimitris
From: Bill Rowe on 15 Dec 2008 07:45 On 12/14/08 at 7:41 AM, stpatryck(a)gmail.com (stpatryck) wrote: >In[111]:= npv[cf0_, cf1_, cf2_, cf3_, cf4_, cf5_] := -(cf0) + >cf1*(1/((1.12)^1)) + cf2*(1/((1.12)^2)) + cf3*(1/((1.12)^3)) + >cf4*(1/((1.12)^4)) + cf5*(1/((1.12)^5)); >(* Plan A NPV *) npv[3600000, 0, 0, 0, 0, 7000000] >SetDelayed::write: Tag Real in >1304.33[cf0_,cf1_,cf2_,cf3_,cf4_,cf5_] is Protected. >> >Out[111]:= 1304.33[3600000, 0, 0, 0, 0, 7000000] I don't see anything wrong with the function definition. The output you obtained strongly suggests you have defined npv earlier in the notebook to be 1304.33. So, try searching for all instances of npv in your notebook.
From: Bob Hanlon on 15 Dec 2008 07:46 At some point you had set npv to 1304.33 Use Clear[npv] prior to the function definition. Bob Hanlon ---- stpatryck <stpatryck(a)gmail.com> wrote: ============= In[111]:= npv[cf0_, cf1_, cf2_, cf3_, cf4_, cf5_] := -(cf0) + cf1*(1/((1.12)^1)) + cf2*(1/((1.12)^2)) + cf3*(1/((1.12)^3)) + cf4*(1/((1.12)^4)) + cf5*(1/((1.12)^5)); (* Plan A NPV *) npv[3600000, 0, 0, 0, 0, 7000000] SetDelayed::write: Tag Real in 1304.33[cf0_,cf1_,cf2_,cf3_,cf4_,cf5_] is Protected. >> Out[111]:= 1304.33[3600000, 0, 0, 0, 0, 7000000] -- Bob Hanlon
From: Jens-Peer Kuska on 15 Dec 2008 07:47
Hi, you ave assigned a value to the varable npv ? Just clean this with npv=. Regards Jens stpatryck wrote: > In[111]:= npv[cf0_, cf1_, cf2_, cf3_, cf4_, cf5_] := -(cf0) + > cf1*(1/((1.12)^1)) + cf2*(1/((1.12)^2)) + cf3*(1/((1.12)^3)) + > cf4*(1/((1.12)^4)) + cf5*(1/((1.12)^5)); > > (* Plan A NPV *) > npv[3600000, 0, 0, 0, 0, 7000000] > > SetDelayed::write: Tag Real in 1304.33[cf0_,cf1_,cf2_,cf3_,cf4_,cf5_] > is Protected. >> > > Out[111]:= 1304.33[3600000, 0, 0, 0, 0, 7000000] > |