You can use a MUX in front of your block and a DEMUX after the block. You can specify multiple input ports also in the S-function. I think all input will be concatenated and passed to your m-file S-function. C S-functions are more flexible. Navan --- "sairamesh90 <>" <> wrote: > i, > I am trying to build a simulink block using s > functions. I have > written my code in matlab, now i am unable to build > a block in > simulink,I Know how to write that code in s- > function tempalate. > but my main problem is that i have two vector > inputs, how to write > that in to s function which is taking only vector > input(u). > for example > assume i want to write a small program > c=a+b; in matlab > and put that block as a simulinkblock. > how to do that ? > > Thansk for ur help > -SaiRamesh. __________________________________________________ |