No BSD License  

Highlights from
Pell.m

4.0

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

Pell.m

by David Terr

 

29 Jul 2004 (Updated 04 Aug 2004)

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

| 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

Contact us at files@mathworks.com