4.0

4.0 | 1 rating Rate this file 164 downloads (last 30 days) File Size: 1.59 KB File ID: #5595

Pell.m

by David Terr

 

29 Jul 2004 (Updated 04 Aug 2004)

No BSD License  

Pell(d,s,n) returns the first n positive integer solution to the modified Pell's equation x^2-dy^2=+

Download Now | Watch this File

File Information
Description

For integers d and s with d nonsquare and positive, Pell(d,s,n) returns the first n positive integer solution (x,y) to the modified Pell's equation x^2-dy^2=(-1)^s, if such a solution exists. Such a solution always exists if s is even, i.e. if the right side is equal to 1, though a solution may not exist if the right side is -1 (s odd), in which case a message is given indicating that this is so. QCF.m is required to run this program.

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
23 Sep 2008 asdasdas asdasd  
Please login to add a comment or rating.
Updates
03 Aug 2004

I corrected the summary.

04 Aug 2004

I added a third argument allowing for multiple solutions.

04 Aug 2004

I fixed the documentation.

Tag Activity for this File
Tag Applied By Date/Time
pells equation David Terr 22 Oct 2008 07:28:46
continued fractions David Terr 22 Oct 2008 07:28:46
quadratic equations David Terr 22 Oct 2008 07:28:46
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com