I am using simulink matlab function to process some inputs and create an output as shown
Here, as shown in the graph I don,t want a step decrease(marked with blue
arrow). Instead I need it follow a slope and go down gradually. This is changed by the 'x2' input in the simulink figure shown above which right now is just a constant block. This block gets activated only when the condition mentioned in the code below is fulfilled and also this height can vary dependng on the different inputs. In nutshell I can only predict the starting point of the red line (top one) and then it should go down to other point on its own.
function y = Signal_gain(Kr,x,x1,x2,x3)
u = 1;
u = x2;
u = x3;
y = u*x;