Hi, my data is between -6 and 3. So I changed the xtick in order to match my values with the given plot. But I got something I was not waiting for. Here is the figure.

댓글 수: 1

dpb
dpb 2018년 7월 7일
Mayhaps what you were looking for is xlim instead...
Need to see your code and the data to be sure what's going on exactly.

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

 채택된 답변

Jan
Jan 2018년 7월 8일

1 개 추천

If you do not specify the X-values of the data, Matlab assume, that they are 1:length(data). Example:
data = rand(1, 10);
plot(data)
If your data goes from -6 to 3, use this as X-values:
x = -6:3;
plot(x, data)

댓글 수: 3

Oscar Espinosa
Oscar Espinosa 2018년 7월 8일
편집: Oscar Espinosa 2018년 7월 8일
I'm getting the values from this table, so the rows are the Xvalues and the columns the Y values. Every value in the intersection of this two are my Z. The problem is that it shows 1:lenght(data), I need to change instead of 1 to 4 and the last element to 6. How can I do this?
Jan
Jan 2018년 7월 8일
The screenshot is hard to read. Which details matter? The intersection of which two? In "it shows 1:lenght(data)", what is "it"?
Please post some code with data, which reproduces the problem.
Oscar Espinosa
Oscar Espinosa 2018년 7월 8일
I could solve it, thank by the comment, help me to think!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

질문:

2018년 7월 7일

댓글:

2018년 7월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by