I'm plotting multiple functions and have a jump in value at the end of one of the functions.
Here is the code that i tried to use:
x1 = 1:0.1:108;
y1 = nthroot(x1,3)*8.56;
plot(x1,y1)
hold on
x2 = 108;
y2 = 44.57;
plot(x2,y2)

2 comentarios

Torsten
Torsten el 18 de Abr. de 2022
Yes, there is a jump:
8,56*(108)^(1/3) = 40,76
not
44.57.
Hrvoje Sarinic
Hrvoje Sarinic el 18 de Abr. de 2022
I think I explained myself poorly in the question; the value, which is 44.57, is not supposed to be a part of the first function(8.56*(x)^(1/3)). I just want to draw a straight line from point (x = 108, y = 40.76,) to point(x= 108, y = 44.57). Could you help me with that? Also, I'll send the whole graph that I am trying to plot; maybe it helps. It consists of 3 different functions and 2 jumps (one is positive and the other is negative). I know how to define the functions, but I'm struggling with the "jumps". And thank you for taking your time to answer.

Iniciar sesión para comentar.

 Respuesta aceptada

Torsten
Torsten el 18 de Abr. de 2022

0 votos

x1 = 1:0.1:108;
y1 = nthroot(x1,3)*8.56;
x2 = 108;
y2 = 44.57;
plot([x1,x2],[y1,y2])

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Preguntada:

el 18 de Abr. de 2022

Comentada:

el 19 de Abr. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by