How to write Exponential growth

조회 수: 6 (최근 30일)
Nouha Amine
Nouha Amine 2022년 5월 25일
편집: Chunru 2022년 5월 25일
Hello,
I am a beginner so I think it's a simple question,
I want to plot a graph which x-axis values vary between 10^0 and 10^5, how do I do that? I know we use (:) this for increment but I don't know how to make it grow exponentially,
Thanks

답변 (1개)

Chunru
Chunru 2022년 5월 25일
편집: Chunru 2022년 5월 25일
x1 = logspace(0, 5, 11) % 11 points btw 10^0 and 10^5 in log space
x1 = 1×11
1.0e+05 * 0.0000 0.0000 0.0001 0.0003 0.0010 0.0032 0.0100 0.0316 0.1000 0.3162 1.0000
x2 = 10.^(0:.5:5)
x2 = 1×11
1.0e+05 * 0.0000 0.0000 0.0001 0.0003 0.0010 0.0032 0.0100 0.0316 0.1000 0.3162 1.0000

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by