<< NARVAL_IP_MoravecT NARVAL NARVAL_IP_ObstCorners >>

NARVAL >> NARVAL > NARVAL_IP_NR2RowCol

NARVAL_IP_NR2RowCol

Transform a linear coordinate to 2D coordinates inside a squared matrix.

Calling Sequence

[row,col] = NARVAL_IP_NR2RowCol(l,r)

Parameters

l :

linear coordinate.

r :

squared matrix size.

row :

line index.

col :

column index.

Description

NARVAL_IP_NR2RowCol transforms the linear coordinate l to its 2D coordinates [row,col] inside a squared matrix of size r*r. The linear coordinate belongs to [1,r*r].

Examples

r=100;//square size
x=ones(100,100);
l=NARVAL_F_Random(r);//linear coordinate
[row,col]=NARVAL_IP_NR2RowCol(l,r);//application of NARVAL_IP_NR2RowCol
l
[r r]
[row col]

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_IP_MoravecT NARVAL NARVAL_IP_ObstCorners >>