Subsections

- Library
- Description
- Dialog Box
- Default properties
- Interfacing function
- Computational function (type 4)

##
Scalar to vector

### Library

Branching

### Description

A scalar input is replicated to form a vector output of desired size. The output size need not be specified.

### Dialog Box

Set block parameters |
size of output (-1: if don't know) | -1

- size of output : integer giving the size of output where each entry is equal to the input

### Default properties

- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- number/sizes of inputs: 1 / 1
- number/sizes of outputs: 1 / -1
- number/sizes of activation inputs: 0 /
- number/sizes of activation outputs: 0 /
- continuous-time state: no
- discrete-time state: no
- name of computational function: scalar2vector

### Interfacing function

`scilab/macros/scicos_blocks/branching/SCALAR2VECTOR.sci`

### Computational function (type 4)

    #include "scicos_block.h"
    #include <math.h>

    void scalar2vector(scicos_block *block,int flag)
    {
      int i;
      if(flag==1){
        for(i=0;i<block->outsz[0];++i){
          block->outptr[0][i]=block->inptr[0][0];
        }
      }
    }