IMind soft

Author's software

Development

Design

Designing

Being tested

convertmatrix

convertmatrix(matrix, first, size), size)

The convertmatrix function is when you have an array of coordinates, and you want to turn it into a neat matrix. Imagine scattered dots on a sheet — and you need to carefully arrange them in the cells of the table so that it is clear what is where.

The whole thing is called like this: convertmatrix(matrix, first, size). Where matrix is the coordinates themselves, first is the start on the X—axis, size is the step, which is also the scale. The minimum set to assemble something systematic from chaotic points.

The algorithm is simple:

First, we look at all the coordinates and realize what our "dream limit" is for X and Y. That is, we find the maximum on both axes in order to know what size the matrix should be.

Creating an empty matrix of the correct size. Without this, there is no point in going any further — you need to build a foundation first.

We start the loop and go through all the coordinates. For each pair (x, y), we calculate where it will end up in the matrix, and we put it right there.

The result? You no longer just have a list of scattered points, but a structured table where each coordinate knows its place. It is convenient, quick to read, and then you can do anything with it — from analysis to visualization.

That's it, basically. A concise feature that saves a lot of time and nerves. Especially if you have to work with coordinates regularly.



Help on built-in functions
The rules of programming scripts
Programm options
Color constants

Top.Mail.Ru