Add An Array and a Number

From DavinciWiki
Jump to: navigation, search

Description

This procedure is one of the most basic things that can be done in davinci. One array will be created and then a number will be added to it and stored in a new variable.

Be aware that these operations can be done with multiplication, division and subtraction too.

Procedure

Creates an array of 3x3 filled with 1s and stores it in a variable "a"

 dv> a=clone(1,3,3,1)
 3x3x1 array of int, bsq format [100 bytes]
 1       1       1 
 1       1       1
 1       1       1

Stores a value of 5 in a variable "b"

 dv> b=5
 5

Adds a and b and stores the result in a new variable "c"

 dv> c=a+b
 3x3x1 array of int, bsq format [100 bytes]
 6       6       6
 6       6       6
 6       6       6

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Functions Used

Personal tools