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 件のコメント

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

サインインしてコメントする。

 採用された回答

Torsten
Torsten 2022 年 4 月 18 日

0 投票

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

1 件のコメント

Hrvoje Sarinic
Hrvoje Sarinic 2022 年 4 月 19 日
Thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by