Sum overlapping region using surf

Dear all,
I'm new in matlab and i'm doing some difficult stuff I guess...
I have 9 matrix (x1,y1,tl1, x2,y2,tl2 and x3,y3,tl3).
(x1,y1,tl1) correspond to the x and y coordinates of the transmission1
(x2,y2,tl2) correspond to the x and y coordinates of the transmission2
(x3,y3,tl3) correspond to the x and y coordinates of the transmission3
The dimension of x's is=20x19
The dimension of y's is=20x19
The dimension of tl's is=20x19
I'm plotting this three groups of matrixes using surf(x1,y,1,tl1) and surf(x2,y2,tl2) and surf(x3,y3,tl3) which gives me three overlapping circles.
First problem:
I need to sum the intersection/the overlapping region between these three plots
Second problem:
I will need to do the same for a n number circles (xn,yn,tln)
Thanks in advance for your help.

6 件のコメント

Walter Roberson
Walter Roberson 2021 年 1 月 26 日
surf() just draws. It cannot calculate intersections.
Ricardo Duarte
Ricardo Duarte 2021 年 1 月 26 日
Yes I know that. Probably I was not clear.
What I want is a matrix composed by the sum of tl1,tl2 and tl3 in a region that they intersect each other and the remaining area (see the figure attached).
Thank you in advance
Walter Roberson
Walter Roberson 2021 年 1 月 26 日
Are your grids individually regularly spaced? Would they happen to be spaced the same, just with different starting points?
You mention circles: does that imply that you have curvilinear coordinates, or does that imply that some of your coordinates are nan to indicate areas not filled?
Ricardo Duarte
Ricardo Duarte 2021 年 1 月 26 日
I don't have any grid (I guess)...
But definetly they have different starting points.
I attached a .mat file with 2 of my matrices.
Thanks for your help.
Walter Roberson
Walter Roberson 2021 年 1 月 27 日
That's not a circle. Do you need the data to be projected into 2D and intersection done for that, or should intersection be done in 3D?
S = load('x_y_tl.mat')
S = struct with fields:
tl1: [20×19 double] tl2: [20×19 double] x1: [20×19 double] x2: [20×19 double] y1: [20×19 double] y2: [20×19 double]
surf(S.x1, 'edgecolor', 'none')
surf(S.y1, 'edgecolor', 'none')
surf(S.tl1, 'edgecolor', 'none')
surf(S.x1, S.y1, S.tl1, 'edgecolor', 'none')
Ricardo Duarte
Ricardo Duarte 2021 年 1 月 27 日
Hello Walter Roberson,
In fact the x and y are the matricis containing the coordinates and the tl contains de information regarding the transmission loss respecting that coordinates.
Taking into account the images you sent what I need is something like the last one (surf(x1,y1,tl1)). However, I want to sum the tl1 and tl2 in the region that they intersect in their x,y axes.
Thanks once again.

サインインしてコメントする。

回答 (0 件)

カテゴリ

質問済み:

2021 年 1 月 26 日

コメント済み:

2021 年 1 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by