how to super impose two images in matlab

조회 수: 1 (최근 30일)
Samaneh Arzpeima
Samaneh Arzpeima 2019년 6월 3일
댓글: Samaneh Arzpeima 2019년 6월 3일
Hi
I want to draw a rectangular with hight of 80km(-40 to 40) and wide of 40km(0 to 40).the next line give me a 80*40 rectangular but the horisontal edge is not from -40 to 40
rectangle('Position',[5 5 80 40])
and then I need to impose a series of points(56 points) with specified coordinate on it.
I have the coordinates in a textfile which I attached here.
I can plot those points,with next few line of cods but don't know how to plot them on the rectangular .
those points suppose to be placed on the middle upper part of the rectangular.
fid=fopen('FAULT_STATIONS.txt')
s=textscan(fid,'%d %d %d %s %d')
fclose(fid)
y=s{2}
z=s{3}
plot(y./1000, z./1000,'o')
would you please tell me how to super impose these 2 images
thank you
**if its possible I need to numbering them
1 9 17 25 33 41 49
2 10 18 26 34 42 50
3 11 19 27 35 43 51
4 12 20 28 36 44 52
5 13 21 29 37 45 53
6 14 22 30 38 46 54
7 15 23 31 39 47 55
8 16 24 32 40 48 56

채택된 답변

KSSV
KSSV 2019년 6월 3일
편집: KSSV 2019년 6월 3일
fid=fopen('FAULT_STATIONS.txt') ;
s=textscan(fid,'%f %f %f %s %f') ;
fclose(fid) ;
y=s{2}/1000 ;
z=s{3}/1000 ;
plot(y, z,'.b')
rectangle('Position',[-40 -40 80 40])
str = num2str([1:length(y)]') ;
text(y,z,str)
  댓글 수: 3
KSSV
KSSV 2019년 6월 3일
Edited the code.
Samaneh Arzpeima
Samaneh Arzpeima 2019년 6월 3일
I've got what I need,thank you

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by