Navigation

Operators and Keywords

Function List:

C++ API

list_primes.m File Reference


Functions

endif endif if (nargin==0) n
endif if (n==1) retval
 retval (1)
 retval (2)
 while (n > 0) is_prime
 while (is_unknown) a
 if (a<=d) is_unknown=0
endif if (a *d==p) is_prime=0
endwhile if (is_prime) retval(i++)

Variables

function retval
 return
 n = n - 2
 i = 3
 p = 5
 is_unknown = 1
 d = 3

Function Documentation

endwhile if ( is_prime   ) 

endif if ( a *  d = =p  )  [pure virtual]

if ( a<=  d  )  [pure virtual]

endif if ( = =1  ) 

endif endif if ( nargin  = =0  ) 

retval (  ) 

retval (  ) 

while ( is_unknown   ) 

while ( ,
 
)


Variable Documentation

endif d = 3

i = 3

n = n - 2

endif p = 5

return

endif retval

Initial value:

 list_primes (n)

  if (nargin > 0)
    if (! isscalar (n))
      error ("list_primes: argument must be a scalar")