Plot different Y values for certain range of X
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Let's say I have:
X = [1:10];
Y = [10:20];
I want to plot Y vs X, but in the range of X=[5:10] I want Y values to be (Y+20). And have the same plot line for all.
How can I do it?
0 comentarios
Respuestas (1)
Jonas
el 7 de Mayo de 2022
you can just calculate the values before plotting
Y(X>=5 & X<=10)=Y(X>=5 & X<=10)+20;
Ver también
Categorías
Más información sobre Visual Exploration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!