To create a ramp signal in MATLAB that hits a specific x value, you can use a combination of conditional statements and linspace function.
Here is an example code that creates a ramp signal with a slope of 2 until it hits the x value of 5, after which the slope changes to 5:
main.m437 chars23 lines
You can modify the slope1, slope2, and x_switch values to match your desired ramp signal.
gistlibby LogSnag