MATLAB: How do i plot til some x one function and then otherplotingi want to plot plz helpy = { x x<=12 12 x>12 } Best Answerx = 0:0.1:20;y = min(12,x);plot(x,y,'-+')In a more general case, use logical indexing, e.g.:x = 0:0.1:20;y = x;y(y>12) = 12; Related QuestionHow to know which plot is more linear then the otherHow to mark one specific point when plottingIF..THEN rulesHow to plot this functionTwo planes cutting each otherIf… then… else

## Best Answer