CODINGLISTINGS ★ Linear Regression ★

Graphic - Linear Regression (Popular Computing Weekly)Coding Listings
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

A step backwards

One step beyond just joining the dots — Linear Regression for the CPC464 by D Rodwell

Plot is a program which accepts any reasonable number of x and y coordinates from the keyboard and displays them as a high resolution plot on a 300 by 300 pixel grid. The scales can be chosen by the user and modified if so desired.
Once the scales have been confirmed the best-fit straight line is displayed together with its equation. The user is then able to use it to calculate any x or y value. The correlation coefficent is also given and this provides a guide to the fit of the regression line.

Program Notes

Line No

  • 440 X and Y ranges are scaled to fit the 300 by 300 pixel grid.
  • 470 The pixel position of each given point is calculated.
  • 510-540 Individual points are plotted as a plus sign and two or more coincident points are plotted as an asterisk.
  • 560-660 The X scales are drawn.
  • 670-770 The Y scales are drawn.
  • 780-800 The X and Y axes are drawn.
  • 820-840 Labels and title are printed.
  • 850-860 Sets up text windows to the right of the graph.
  • 870-890 Provides an opportunity to re-scale the axes.
  • 910-1060 Calculates and prints the regression equation and correlation on coefficient.
  • 1070-1350 Draws the regression line on the plot.
  • 1370-1580 Enables the user to estimate any X for a given Y or any Y for a given X.

PopularComputingWeekly841220

★ PUBLISHER: POPULAR COMPUTING WEEKLY
★ YEAR: 1984
★ AUTHOR: D. Rodwell

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Linear  Regression    (Popular  Computing  Weekly)    LISTING    ENGLISHDATE: 2024-03-09
DL: 7
TYPE: PDF
SiZE: 181Ko
NOTE: 2 pages/PDFlib v1.6

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Coding Src's » Graphic - Mirror (CPC Attack)
» Coding Src's » Graphic (Mark Holmes/Amstrad Action)
» Coding Src's » Einstein (Amstrad Magazine)
» Coding Src's » Mutli-Coloured Characters (Amstrad Action)
» Coding Src's » Baum des Pythagoras (CPC Amstrad International)
» Coding Src's » Sierpinski Fern (Amstrad Computer User)
Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce programme ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 470 millisecondes et consultée 1389 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.