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 Comments

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

Sign in to comment.

 Accepted Answer

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

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!