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 Kommentare

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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Torsten
Torsten am 18 Apr. 2022

0 Stimmen

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

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by