help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem failure file


From: fibonacci4
Subject: Re: problem failure file
Date: Thu, 21 Feb 2019 10:23:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Am 21.02.19 um 10:16 schrieb Robert Setif:
   Good morning.
Here is that file with a problem I do not understand.

# dfac.m 21/2/2019  double factorial
function r=dfac(n)
f=1;
if (n=0)
  r=1;
elseif (mod(n,2)=0)
    for i=n:-2:2,f=f*i;,endfor
else
for i=1:2:n,f=f*i;,endfor
  endif
 r=f;
endfunction

Thank you very much.
Best regards
FRANCE


    

Maybe, if there would be a hint, what you do not understand, somebody might be able to help you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]