Graph with similar axis value with the value given

조회 수: 1 (최근 30일)
Fakhri Alifin
Fakhri Alifin 2021년 2월 3일
답변: Daniel Pollard 2021년 2월 3일
Good Afternoon, I'm a newbie in matlab.
I have these two groups of value
y = [733.3036 723.4694 717.7095 713.5816 711.1634 709.3579 708.2943 707.9351 708.3573 709.3768 711.9425 713.9145 717.3444 722.2313];
x = [0.5 0.6 0.7 0.8 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99];
I want the graph shows me the specific axis range (similar with the x and y value given) that is [0.5 0.6 0.7 0.8 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99] and [733.3036 723.4694 717.7095 713.5816 711.1634 709.3579 708.2943 707.9351 708.3573 709.3768 711.9425 713.9145 717.3444 722.2313].
because whenever plot it directly with plot(x,y), the value appeared was unmatched with the value given (i.e x = 0.5 0.55.....) so the coordinate wouldn't be matched.
Would anyone wanna help me? thank you.

답변 (1개)

Daniel Pollard
Daniel Pollard 2021년 2월 3일
As a note: you need the vectors to be in ascending order, and your second tickmark vector isn't. sort should help there.

카테고리

Help CenterFile Exchange에서 2-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