I want to have a linear function ,

Code: Select all

`y = f(x,y1,y2,y3)`

Code: Select all

```
y = y1 , if x = x1
```

Code: Select all

```
y = y2 , if x = x2
```

Code: Select all

```
y = y2 , if x = x3
```

I can do it when x is binary (0,1) as follows:

Code: Select all

```
y = x*y1 + (1-x)*y2
```

Code: Select all

```
y = y1 , if x = 1
y = y2 , if x = 0
```

Please help me in this.

Thanks