필터 지우기
필터 지우기

Relation between depths and thicknesses

조회 수: 1 (최근 30일)
Moustafa Abedel Fattah
Moustafa Abedel Fattah 2022년 7월 12일
댓글: VBBV 2022년 11월 12일
I have five buried layers of known depths and four of them are of known thicknesses. The last depth is obtained from the relation (z5 = sum t(i) + z1) as shown in attached figure. Please I need a short code to get the depths useing the foremention formula. (N.B. I have give a numerical values for depths and thicknesses)
Thanks in advance for quick response as always.
Best Regards;
M. Dahab

답변 (2개)

Bharat Chandra Mukkavalli
Bharat Chandra Mukkavalli 2022년 7월 12일
Hi,
The following code will cater your purpose:
z = [7 38 65 117];
t = [31 27 52 268];
z5 = 0;
for i=1:length(t)
z5 = z5 + t(i);
end
z5 = z5 + z(1);
z(end+1) = z5;
Hope this helps!
  댓글 수: 1
Moustafa Abedel Fattah
Moustafa Abedel Fattah 2022년 7월 13일
Thanks BM, for your kindest as also for quick response, it work but I need the depths of layers ( z = [7 38 65 117]) from the known thicknesses of layers (t = [31 27 52 268]) and the last layer depth's (have no thickness).
Can you or any one do it. thanks again

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


VBBV
VBBV 2022년 11월 12일
syms z1 z2 z3 z4 z5
t = [31 27 52 268]; % known thicknesses
eq1 = z1;
eq2 = z2 == z1 + t(1);
eq3 = z3 == z2 + t(2);
eq4 = z4 == z3 + t(3);
eq5 = z5 == z4 + t(4);
sol = solve([eq1 eq2 eq3 eq4 eq5],[z1 z2 z3 z4 z5])
sol = struct with fields:
z1: 0 z2: 31 z3: 58 z4: 110 z5: 378
  댓글 수: 1
VBBV
VBBV 2022년 11월 12일
you can solve for the depth variables using known thicknesses as above

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

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by