# How to extend a curve until x-axis and y-axis

조회 수: 2(최근 30일)
Giuseppe 11 Jan 2020
댓글: Giuseppe 15 Jan 2020
Hi guys! I've plotted the red curve through a set of data (.txt file of points):
How can I extend the red curve untile axes of cartesian plane ?

#### 댓글 수: 4

표시 이전 댓글 수: 1
Giuseppe 11 Jan 2020
the x data are (each value must be divided by 5.68):
0.1115
0.3344
0.5567
0.7782
0.9985
1.2173
1.4342
1.6488
1.8609
2.0702
2.2763
2.4788
2.6775
2.8721
3.0623
3.2478
3.4282
3.6034
3.7730
3.9367
4.0944
4.2458
4.3907
4.5288
4.6599
4.7838
4.9003
5.0093
5.1106
5.2039
5.2893
5.3665
5.4354
5.4960
5.5480
5.5915
5.6264
5.6526
5.6701
5.6789
the y data are:
0.8003
0.8256
0.8503
0.8745
0.8990
0.9228
0.9466
0.9697
0.9926
1.0152
1.0371
1.0583
1.0790
1.0992
1.1182
1.1361
1.1531
1.1681
1.1815
1.1930
1.2019
1.2078
1.2104
1.2088
1.2025
1.1907
1.1725
1.1469
1.1132
1.0701
1.0171
0.9533
0.8781
0.7914
0.6934
0.5846
0.4663
0.3400
0.2075
0.0710
As you can see, I don't have the "bounday" data points!
The curve must stop to eta=0 and to Cl=0.
Are you expecting something like below?
Giuseppe 15 Jan 2020
No, I want to obtain this following one (i.e., I want to plot the green parts):

로그인 to comment.

### 채택된 답변

WalterWhite 15 Jan 2020
It doesnt seem to happen with interpolation(interp1)...atleast for me. But i've come up with an alternative based on the geometry and i've explained the reason along the code. Hope this helps

#### 댓글 수: 3

Giuseppe 15 Jan 2020
Ok, it works for the left part of figure!
Any solution for the lower part (i.e. the intersection with horizontal axis eta) ?
WalterWhite 15 Jan 2020
It's basically the same concept for the other end. You just have to copy paste and change the values. But this is not an accurate result, mind you
Giuseppe 15 Jan 2020
Ok, thanks!

로그인 to comment.

### 추가 답변(1개)

Navya Seelam 15 Jan 2020
Hi,
You can use interp1 function to interpolate your plot till x=0. There are different methods the function adopts for interpolation. You can choose from these methods to achieve appropriate interpolation. For more details on interp1 go through the link below.

#### 댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by