Eigenvalues experiment

Eigenvalues experiment preview image

1 collaborator

Tags

eigenvalues 

Tagged by Francisco Restivo 4 months ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.2 • Viewed 202 times • Downloaded 10 times • Run 0 times
Download the 'Eigenvalues experiment' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


## WHAT IS IT?

Applies the matrix transformation to a set of unit vectors

## HOW IT WORKS

There is one agent for each of the 128 unit vectors.

## HOW TO USE IT

Choose the coefficients of the 2x2 matrix and press Go.

## THINGS TO NOTICE

It´s a first step to understanding engelvalues and eigenvectors.

You can use colours for an insight.

## THINGS TO TRY

You can just press Go for a new experiment.

## EXTENDING THE MODEL

--

## NETLOGO FEATURES

--

## RELATED MODELS

--

## CREDITS AND REFERENCES

Author: Francisco Restivo (frestivo@gmail.com).

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

; Aims to emonstrate the eigenvectors of a 2x2 matrix

; Created by Francisco Restivo, frestivo@gmail.com

globals [tr det delta EV1 EV2 alpha x0 y0 x1 y1]

to go
 clear-all
 crt 128 ; 128 turtles, for 128 unit vectors
 set tr A11 + A22
 set det A11 * A22 - A12 * A21
 set delta tr * tr - 4 * det
 set EV1 0
 set EV2 0
 if delta >= 0 [
   set delta sqrt (delta)
   set EV1 (tr + delta) / 2
   set EV2 (tr - delta) / 2 ]
 ask turtles [
   pd
   set shape "circle"
   set size 0
   set color green + who / 28
   set alpha 360 * who / 128
   set x0 Scale * cos alpha
   set y0 Scale * sin alpha
   setxy x0 y0
   setxy 0 0
   set x1 A11 * x0 + A12 * y0
   set y1 A21 * x0 + A22 * y0
   setxy x1 y1 ]
end 

There is only one version of this model, created 4 months ago by Francisco Restivo.

Attached files

File Type Description Last updated
Eigenvalues experiment.png preview Preview for 'Eigenvalues experiment' 4 months ago, by Francisco Restivo Download

This model does not have any ancestors.

This model does not have any descendants.