From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Coping with asymptotes in tan function
Date: Tue, 7 Dec 2010 18:44:06 +0000 (UTC)
Organization: Boreal Laser Inc
Lines: 9
Message-ID: <idlv9l$lgt$>
References: <idlsbt$9ip$> <idltr7$h3o$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1291747446 22045 (7 Dec 2010 18:44:06 GMT)
NNTP-Posting-Date: Tue, 7 Dec 2010 18:44:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 672361
Xref: comp.soft-sys.matlab:693363

> if any(phi==[0 90 180 270])
>    error('Ill conditioned');
> end
> If they can have numbers outside that range, use MOD or REM to convert.  Also, be careful of floating point issues.  E.g. What do you want to do if they enter 90.00002?

Thanks Sean, I was actually hoping to still get some results, rather than just return an error.  One of my thoughts was to add 1e-6 to the value of phi.

I'm not quite sure what your comment about floating points means.