Subsections
Scalar to vector
Branching
A scalar input is replicated to form a vector output of desired
size. The output size need not be specified.
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
- 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
scilab/macros/scicos_blocks/branching/SCALAR2VECTOR.sci
#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];
}
}
}
Ramine Nikoukhah
2004-06-22