# how to super impose two images in matlab

2 views (last 30 days)
Samaneh Arzpeima on 3 Jun 2019
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 on 3 Jun 2019
Edited: KSSV on 3 Jun 2019
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)
Samaneh Arzpeima on 3 Jun 2019
I've got what I need,thank you

R2018b

### Community Treasure Hunt

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

Start Hunting!