There may be fancy way to do it with a single line (or other type of) object, but it's easy to do it with two
t = 0:.01:1;
y = sin(2*pi*10*t);
figure
ii = find(t <= 0.35);
plot(t(ii),y(ii),'r',t(ii(end):end),y(ii(end):end),'k')
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!