Skip to main content
19-Tanzanite
Sep 23, 2024 9:52 AM UTC
Solved

Plot failed to show after I added else NaN

Hi,

Why without adding that else NaN at the final the plot is showing the waveform, but after that else NaN was added at the final of the function then the plot failed?

 

Cornel_1-1727084760618.png

 

Cornel_2-1727084797132.png

terryhendicott
21-Topaz II
Sep 23, 2024 10:43 AM UTC

Need mutually exclusive if branches or it always retuns NAN's at t<=2a

Capture.JPG

2 replies

terryhendicott
21-Topaz II
Sep 23, 2024 10:43 AM UTC

Need mutually exclusive if branches or it always retuns NAN's at t<=2a

Capture.JPG

Translate
Werner_E
25-Diamond I
Sep 23, 2024 7:52 PM UTC

I find it easier to use explicit return statements.

Werner_E_0-1727121183101.png

 

Translate