Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <idlsbt$9ip$1@fred.mathworks.com> <idltr7$h3o$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1291747446 22045 172.30.248.38 (7 Dec 2010 18:44:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 7 Dec 2010 18:44:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 672361
Xref: news.mathworks.com 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.