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 commentaires

Torsten
Torsten le 18 Avr 2022
Yes, there is a jump:
8,56*(108)^(1/3) = 40,76
not
44.57.
Hrvoje Sarinic
Hrvoje Sarinic le 18 Avr 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.

Connectez-vous pour commenter.

 Réponse acceptée

Torsten
Torsten le 18 Avr 2022

0 votes

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

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by