max_recursion_depth exceeded

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

max_recursion_depth exceeded

harish3679
Hi folks, Any value I pass to sin function its prompting an error message.
While opening octave there is also a warning message

warning: function .\test_function.m shadows a built-in function

sin(2*pi)
error: max_recursion_depth exceeded
error: called from
    sin at line 30 column 4






--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

Octave - General mailing list
On 10/9/19 10:01 AM, harish3679 wrote:
> Hi folks, Any value I pass to sin function its prompting an error message.
> While opening octave there is also a warning message
>
> warning: function .\test_function.m shadows a built-in function
>
> sin(2*pi)
> error: max_recursion_depth exceeded
> error: called from
>      sin at line 30 column 4

So, is it possible that you redefined the sin() function in your
test_function.m?

Could you post its content?



Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

Andreas Weber-6
In reply to this post by harish3679
Am 09.10.19 um 16:01 schrieb harish3679:
> sin(2*pi)
> error: max_recursion_depth exceeded
> error: called from
>     sin at line 30 column 4

You have created a function "sin" which overwrites the builtin function
and you make a recursive call to itself at line 30


Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

Doug Stewart-4
In reply to this post by harish3679


On Wed, Oct 9, 2019 at 2:52 PM harish3679 <[hidden email]> wrote:
Hi folks, Any value I pass to sin function its prompting an error message.
While opening octave there is also a warning message

warning: function .\test_function.m shadows a built-in function

sin(2*pi)
error: max_recursion_depth exceeded
error: called from
    sin at line 30 column 4






--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



did you make a function named  sin.m?

use
which sin
 to find out what version is being called.


--
DASCertificate for 206392



Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

harish3679
I renamed the files, though still getting an error message

Regards,
Harish

On Thu, Oct 10, 2019 at 2:02 AM Doug Stewart <[hidden email]> wrote:


On Wed, Oct 9, 2019 at 2:52 PM harish3679 <[hidden email]> wrote:
Hi folks, Any value I pass to sin function its prompting an error message.
While opening octave there is also a warning message

warning: function .\test_function.m shadows a built-in function

sin(2*pi)
error: max_recursion_depth exceeded
error: called from
    sin at line 30 column 4






--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



did you make a function named  sin.m?

use
which sin
 to find out what version is being called.


--
DASCertificate for 206392



--
Harish Kumar

M: +91 9488309620, Whatsapp: +91 9944308505

E: [hidden email]

A:

15/36, Ramanna Layout 2, Bharathi Park Road 2, 


Saibaba Colony, Coimbatore -641 043. Tamil Nadu, India







Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

BGreen
Did you rename the function as well, or only the files? It sounds like you redefined "sin" in the file " test_function.m".

- Brett Green


On Sat, Oct 12, 2019 at 10:12 AM Harishkumar U <[hidden email]> wrote:
I renamed the files, though still getting an error message

Regards,
Harish

On Thu, Oct 10, 2019 at 2:02 AM Doug Stewart <[hidden email]> wrote:


On Wed, Oct 9, 2019 at 2:52 PM harish3679 <[hidden email]> wrote:
Hi folks, Any value I pass to sin function its prompting an error message.
While opening octave there is also a warning message

warning: function .\test_function.m shadows a built-in function

sin(2*pi)
error: max_recursion_depth exceeded
error: called from
    sin at line 30 column 4






--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



did you make a function named  sin.m?

use
which sin
 to find out what version is being called.


--
DASCertificate for 206392



--
Harish Kumar

M: +91 9488309620, Whatsapp: +91 9944308505

E: [hidden email]

A:

15/36, Ramanna Layout 2, Bharathi Park Road 2, 


Saibaba Colony, Coimbatore -641 043. Tamil Nadu, India








Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

harish3679
Correct. Now when I open the file some functions inside aren't working like sound(file, fs),wavwrite(file, fs, file.wav)

On Sat 12 Oct, 2019 19:52 Brett Green, <[hidden email]> wrote:
Did you rename the function as well, or only the files? It sounds like you redefined "sin" in the file " test_function.m".

- Brett Green


On Sat, Oct 12, 2019 at 10:12 AM Harishkumar U <[hidden email]> wrote:
I renamed the files, though still getting an error message

Regards,
Harish

On Thu, Oct 10, 2019 at 2:02 AM Doug Stewart <[hidden email]> wrote:


On Wed, Oct 9, 2019 at 2:52 PM harish3679 <[hidden email]> wrote:
Hi folks, Any value I pass to sin function its prompting an error message.
While opening octave there is also a warning message

warning: function .\test_function.m shadows a built-in function

sin(2*pi)
error: max_recursion_depth exceeded
error: called from
    sin at line 30 column 4






--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



did you make a function named  sin.m?

use
which sin
 to find out what version is being called.


--
DASCertificate for 206392



--
Harish Kumar

M: +91 9488309620, Whatsapp: +91 9944308505

E: [hidden email]

A:

15/36, Ramanna Layout 2, Bharathi Park Road 2, 


Saibaba Colony, Coimbatore -641 043. Tamil Nadu, India








Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

BGreen
We're basically working blind here because we have no idea what's in the file and what changes you've made. If you don't share your code, it will be very difficult for anyone to help.

- Brett Green


On Sat, Oct 12, 2019 at 10:47 AM Harishkumar U <[hidden email]> wrote:
Correct. Now when I open the file some functions inside aren't working like sound(file, fs),wavwrite(file, fs, file.wav)

On Sat 12 Oct, 2019 19:52 Brett Green, <[hidden email]> wrote:
Did you rename the function as well, or only the files? It sounds like you redefined "sin" in the file " test_function.m".

- Brett Green


On Sat, Oct 12, 2019 at 10:12 AM Harishkumar U <[hidden email]> wrote:
I renamed the files, though still getting an error message

Regards,
Harish

On Thu, Oct 10, 2019 at 2:02 AM Doug Stewart <[hidden email]> wrote:


On Wed, Oct 9, 2019 at 2:52 PM harish3679 <[hidden email]> wrote:
Hi folks, Any value I pass to sin function its prompting an error message.
While opening octave there is also a warning message

warning: function .\test_function.m shadows a built-in function

sin(2*pi)
error: max_recursion_depth exceeded
error: called from
    sin at line 30 column 4






--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



did you make a function named  sin.m?

use
which sin
 to find out what version is being called.


--
DASCertificate for 206392



--
Harish Kumar

M: +91 9488309620, Whatsapp: +91 9944308505

E: [hidden email]

A:

15/36, Ramanna Layout 2, Bharathi Park Road 2, 


Saibaba Colony, Coimbatore -641 043. Tamil Nadu, India








Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

Doug Stewart-4


On Sat, Oct 12, 2019 at 10:53 AM Brett Green <[hidden email]> wrote:
We're basically working blind here because we have no idea what's in the file and what changes you've made. If you don't share your code, it will be very difficult for anyone to help.

- Brett Green



I also asked him to use the "which" command and report what it says , but he didn't :-(


 

On Sat, Oct 12, 2019 at 10:47 AM Harishkumar U <[hidden email]> wrote:
Correct. Now when I open the file some functions inside aren't working like sound(file, fs),wavwrite(file, fs, file.wav)

On Sat 12 Oct, 2019 19:52 Brett Green, <[hidden email]> wrote:
Did you rename the function as well, or only the files? It sounds like you redefined "sin" in the file " test_function.m".

- Brett Green


On Sat, Oct 12, 2019 at 10:12 AM Harishkumar U <[hidden email]> wrote:
I renamed the files, though still getting an error message

Regards,
Harish

On Thu, Oct 10, 2019 at 2:02 AM Doug Stewart <[hidden email]> wrote:


On Wed, Oct 9, 2019 at 2:52 PM harish3679 <[hidden email]> wrote:
Hi folks, Any value I pass to sin function its prompting an error message.
While opening octave there is also a warning message

warning: function .\test_function.m shadows a built-in function

sin(2*pi)
error: max_recursion_depth exceeded
error: called from
    sin at line 30 column 4






--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



did you make a function named  sin.m?

use
which sin
 to find out what version is being called.


--
DASCertificate for 206392



--
Harish Kumar

M: +91 9488309620, Whatsapp: +91 9944308505

E: [hidden email]

A:

15/36, Ramanna Layout 2, Bharathi Park Road 2, 


Saibaba Colony, Coimbatore -641 043. Tamil Nadu, India








--
DASCertificate for 206392



Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

harish3679
Hi Guys,

I am using Octave 5.1, the built-in function clash with sin.m is resolved thanks!!

Here is the code:

freq = 1000; %Hz, unit for sampling rate
fs = 44100;  %Hz
sine_tone = sin(2*pi*freq * (1:fs) / fs);
plot(sine_tone(1:200)
sound(sine_tone, fs)
wavwrite(tone, fs, 'test-tone.wav')

Here is a new error:

>> SineTesTtone

parse error near line 5 of file C:/Users/Admin/Desktop/Load/ee modelling tools/octave projects\SineTesTtone.m

  syntax error

>>> sound(sine_tone, fs)

On Sat, Oct 12, 2019 at 8:26 PM Doug Stewart <[hidden email]> wrote:


On Sat, Oct 12, 2019 at 10:53 AM Brett Green <[hidden email]> wrote:
We're basically working blind here because we have no idea what's in the file and what changes you've made. If you don't share your code, it will be very difficult for anyone to help.

- Brett Green



I also asked him to use the "which" command and report what it says , but he didn't :-(


 

On Sat, Oct 12, 2019 at 10:47 AM Harishkumar U <[hidden email]> wrote:
Correct. Now when I open the file some functions inside aren't working like sound(file, fs),wavwrite(file, fs, file.wav)

On Sat 12 Oct, 2019 19:52 Brett Green, <[hidden email]> wrote:
Did you rename the function as well, or only the files? It sounds like you redefined "sin" in the file " test_function.m".

- Brett Green


On Sat, Oct 12, 2019 at 10:12 AM Harishkumar U <[hidden email]> wrote:
I renamed the files, though still getting an error message

Regards,
Harish

On Thu, Oct 10, 2019 at 2:02 AM Doug Stewart <[hidden email]> wrote:


On Wed, Oct 9, 2019 at 2:52 PM harish3679 <[hidden email]> wrote:
Hi folks, Any value I pass to sin function its prompting an error message.
While opening octave there is also a warning message

warning: function .\test_function.m shadows a built-in function

sin(2*pi)
error: max_recursion_depth exceeded
error: called from
    sin at line 30 column 4






--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



did you make a function named  sin.m?

use
which sin
 to find out what version is being called.


--
DASCertificate for 206392



--
Harish Kumar

M: +91 9488309620, Whatsapp: +91 9944308505

E: [hidden email]

A:

15/36, Ramanna Layout 2, Bharathi Park Road 2, 


Saibaba Colony, Coimbatore -641 043. Tamil Nadu, India








--
DASCertificate for 206392



--
Harish Kumar

M: +91 9488309620, Whatsapp: +91 9944308505

E: [hidden email]

A:

15/36, Ramanna Layout 2, Bharathi Park Road 2, 


Saibaba Colony, Coimbatore -641 043. Tamil Nadu, India







Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

siko1056
On 10/13/19 12:41 AM, Harishkumar U wrote:> Hi Guys,

>
> I am using Octave 5.1, the built-in function clash with sin.m is
> resolved thanks!!
>
> Here is the code:
>
> freq = 1000; %Hz, unit for sampling rate
> fs = 44100;  %Hz
> sine_tone = sin(2*pi*freq * (1:fs) / fs);
> plot(sine_tone(1:200)
> sound(sine_tone, fs)
> wavwrite(tone, fs, 'test-tone.wav')
>
> Here is a new error:
>
>>> SineTesTtone
>
> parse error near line 5 of file C:/Users/Admin/Desktop/Load/ee modelling
> tools/octave projects\SineTesTtone.m
>
>   syntax error
>
>>>> sound(sine_tone, fs)
>

On this mailing list we have the convention to answer BELOW the previous
text.  Please stick to this convention in the future.  The error message
indicates, that you have forgotten a ")" at the end of that line

   plot(sine_tone(1:200)

HTH,
Kai


Reply | Threaded
Open this post in threaded view
|

Re: max_recursion_depth exceeded

harish3679
Will do, thanks! 

On Sat 12 Oct, 2019 21:19 Kai Torben Ohlhus, <[hidden email]> wrote:
On 10/13/19 12:41 AM, Harishkumar U wrote:> Hi Guys,
>
> I am using Octave 5.1, the built-in function clash with sin.m is
> resolved thanks!!
>
> Here is the code:
>
> freq = 1000; %Hz, unit for sampling rate
> fs = 44100;  %Hz
> sine_tone = sin(2*pi*freq * (1:fs) / fs);
> plot(sine_tone(1:200)
> sound(sine_tone, fs)
> wavwrite(tone, fs, 'test-tone.wav')
>
> Here is a new error:
>
>>> SineTesTtone
>
> parse error near line 5 of file C:/Users/Admin/Desktop/Load/ee modelling
> tools/octave projects\SineTesTtone.m
>
>   syntax error
>
>>>> sound(sine_tone, fs)
>

On this mailing list we have the convention to answer BELOW the previous
text.  Please stick to this convention in the future.  The error message
indicates, that you have forgotten a ")" at the end of that line

   plot(sine_tone(1:200)

HTH,
Kai