Pell.m

Version 1.0.0.0 (804 Bytes) by David Terr
Pell(d,s,n) returns the first n positive integer solution to the modified Pell's equation x^2-dy^2=+
2.1K Downloads
Updated 4 Aug 2004

No License

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.

Cite As

David Terr (2026). Pell.m (https://uk.mathworks.com/matlabcentral/fileexchange/5595-pell-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Quadratic Programming and Cone Programming in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0

I fixed the documentation.