Mikroelektronika MIKROE-442 Datenbogen
644
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
Vectors Library
mikroBasic PRO for dsPIC30/33 and PIC24 includes a library for working and using vectors. All routines work with
fractional Q15 format.
Library Routines
- Vector_Set
- Vector_Power
- Vector_Subtract
- Vector_Scale
- Vector_Negate
- Vector_Multiply
- Vector_Min
- Vector_Max
- Vector_Dot
- Vector_Correlate
- Vector_Convolve
- Vector_Add
Vector_Set
Prototype
sub procedure Vector_Set(dim byref input as word[1024], dim size, value as
word)
Description Sets
size
elements of
input
to
value
, starting from the first element.
Parameters
- input:
pointer to original vector
- size:
number of vector elements
- value:
value written to the elements
Returns
Nothing.
Requires
Nothing.
Example
dim vec2 as word[3]
Vector_Set(vec2, 3, 0x4000)
Notes
-
size
must be > 0
- Length of
input
is limited by available RAM