I would like to plot a function but change a value part way through the plot, specifically in the code below, for values of (x<M) I would like to set R = RL and for values of (x>M) I would like to set R = RR. Any help appreciated. Thanks
x = 0:0.01:2;M = 1;R = 2;LR = 0.25;RL = (0.5 / LR) * R;RR = (0.5 / (1 - LR)) * R;y = exp(-(4* * *R* * .^2*(log(2))*(M - x).^2)/(M.^2));plot(x,y)grid on
Best Answer