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 Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by