[Top][All Lists]

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

Re: message "error" 'n' undefine near ...

From: Andreas Weber
Subject: Re: message "error" 'n' undefine near ...
Date: Sun, 24 Feb 2019 16:04:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

Am 24.02.19 um 15:49 schrieb Robert Setif:
My joined file "dfac.m" has a problem :
" error: 'n' undefined near line 4 column 6
error: called from
     dfac at line 4 column 2 ".
It is not very serious,because "dfac(10) " products 3840.
However that becomes awkward, because this same error practically arrives at all my programs. How to announce that “N” is a integer?
   Thank you and best regards.

What is you problem here?
You want to be able to call "dfrac" without argument "dfrac()"
If this is the case you can declare a default value:

function r = dfac (n = 0)....

-- Andy

reply via email to

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