Help plot with cell array scale problem

조회 수: 1 (최근 30일)
5mid
5mid 2013년 12월 9일
댓글: sixwwwwww 2013년 12월 9일
The scale is not what I want
scatter(NGPSLongitude{1,1},NGPSLatitude{1,1},'r','*')
hold on
it appears me only 2 points and should appear 200...
  댓글 수: 2
sixwwwwww
sixwwwwww 2013년 12월 9일
can you show your cell arrays NGPSLongitude and NGPSLatitude what they contain in their first cell {1,1}?
5mid
5mid 2013년 12월 9일
편집: 5mid 2013년 12월 9일
its like this x =
43.7347
43.7354
43.7368
43.7370
43.7371
43.7374
43.7373
43.7377
43.7383
43.7388
0
0
43.7403
y =
7.4214
7.4212
7.4215
7.4218
7.4221
7.4239
7.4255
7.4269
7.4278
7.4281
0
0
7.4279

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

채택된 답변

sixwwwwww
sixwwwwww 2013년 12월 9일
try this:
x = [43.7347 43.7354 43.7368 43.7370 43.7371 43.7374 43.7373 43.7377 43.7383 43.7388 0 0 43.7403];
NGPSLongitude{1,1} = x(x ~= 0);
y = [7.4214 7.4212 7.4215 7.4218 7.4221 7.4239 7.4255 7.4269 7.4278 7.4281 0 0 7.4279];
NGPSLatitude{1,1} = y(y ~= 0);
scatter(NGPSLongitude{1,1},NGPSLatitude{1,1},'r','*')
You need to exclude the values at which both x and y are 0 in order to see graph properly. Because the difference between the points is very small.
  댓글 수: 5
sixwwwwww
sixwwwwww 2013년 12월 9일
yes you are right you can do it like that
sixwwwwww
sixwwwwww 2013년 12월 9일
you are welcome

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 12월 9일
Your values 43.73* and 7.42* are very close together compared to the 0 and 0. All of the 43.73* / 7.42* are showing up on top of each other, and all of the 0 / 0 points are showing up on top of each other. If you zoom in on the upper right points you should be able to see them separately.
Is it possible that you want the 0 / 0 points to be omitted ?
  댓글 수: 1
5mid
5mid 2013년 12월 9일
편집: 5mid 2013년 12월 9일
Yes it is. How can I do that?
Thanks

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

카테고리

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