06-18-2021, 08:04 PM
For those of us who engaged in photography, we sometimes want to find the horizontal and vertical resolution of a sensor from the Megapixels (P) and aspect ratio (R). The following program uses only the stack (Y=Megapixels, X=Ratio) and the answer returned to X=Horizontal res. and Y=Vertical res.
The program is based on the formulas:HRes=SQRT(P*R), YRES=SQRT(P/R).
The program is based on the formulas:HRes=SQRT(P*R), YRES=SQRT(P/R).
Code:
P001 LBL P
P002 ENTER
P003 ENTER
P004 REGT
P005 *
P006 SQRT
P007 RDN
P008 /
P009 SQRT
P010 ENTER
P011 REGT
P012 X<>Y
P013 RTN