cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

I have some questions

jlee-2
1-Newbie

I have some questions

Hello I write to want to know about my question.

%EC%BA%A1%EC%B2%98.PNG

I have a problem. you can know to a picture on upper.

I read error massage and I knew why error is generated.

error is said that it is not possible to divide 'zero'.

Could I slove following error?

I attached my files.

Thank you for reading my question

4 REPLIES 4
Werner_E
24-Ruby V
(To:jlee-2)

While the best way probably is to avoid my=0 alltogether, another workaround is the redefinition of the function b() so it catches the error and returns a dummy result or, as shown below, a NaN (Not-a-Number).

1.png

Thank you for consideration.

I knew method that I want to know for you

RichardJ
19-Tanzanite
(To:jlee-2)

You get a divide by zero either when mu=0 or when mu=1. It's clear that as mu approaches 1, b(mu) approaches 0, so that's easy to fix. However, as mu approaches 0, b(mu) rises asymptotically to infinity, and when mu =0, b(mu) is undefined. So the real solution is to not calculate b(mu) for mu =0, because it's meaningless. If you don't want to do that, then make the function return NaN for mu=0.

Thank you.

I got help due to you.

Top Tags