필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
winfrida mwigilwa
winfrida mwigilwa 2024년 3월 18일
댓글: winfrida mwigilwa 2024년 3월 21일
Hello guys I have plotted a curve with the following codes. But I want to extend the curve in both x-axis and y-axis.
r=0.03;
T=10;
t=2;
lambda1=0.28:0.28:3.08;
thai=0.43;
alpha=7.2;
delta=0.0609;
s=100:100:1100;
sigma=2;
gamma=0.5;
pai_1=(-(r-thai.*(alpha-(1-lambda1).*delta-log(s))).*exp(-r.*(T-t)))./(gamma.*sigma.^2);
plot(lambda1,pai_1)
  댓글 수: 1
Dyuman Joshi
Dyuman Joshi 2024년 3월 18일
"I want to extend the curve in both x-axis and y-axis."
Modify the x-values accordingly.

댓글을 달려면 로그인하십시오.

채택된 답변

Chunru
Chunru 2024년 3월 18일
Use "axis tight"
r=0.03;
T=10;
t=2;
lambda1=0.28:0.28:3.08;
thai=0.43;
alpha=7.2;
delta=0.0609;
s=100:100:1100;
sigma=2;
gamma=0.5;
pai_1=(-(r-thai.*(alpha-(1-lambda1).*delta-log(s))).*exp(-r.*(T-t)))./(gamma.*sigma.^2);
plot(lambda1,pai_1)
axis tight
  댓글 수: 3
Dyuman Joshi
Dyuman Joshi 2024년 3월 18일
Hello @winfrida mwigilwa, if this answer solved your problem, please consider accepting the answer.
winfrida mwigilwa
winfrida mwigilwa 2024년 3월 21일
yes it solved my problem. Thank you so much.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by