I have 200 by 4 matrix represents thicknesses and need to calculate the corresponding depths (will be also 200 by 4 matrix)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Moustafa Abedel Fattah
am 9 Apr. 2022
Kommentiert: Sam Chak
am 9 Apr. 2022
the rows represents the thicknesses and columns represents wells (boreholes).
assuming thicknesses h1, h2, h3, and h4 in first row in thicknesses matrix
then the depths sholuld be z1= h1, z2 = h1+h2, z3 = h1+h2+h3, and z4 = h1+h2+h3+h4 in first row in depth matrix
thanks in advance
0 Kommentare
Akzeptierte Antwort
Voss
am 9 Apr. 2022
% a random 10-by-4 matrix of thicknesses
% each element between 1 and 15:
h = randi(15,10,4)
% depth is cumulative sum along rows of h:
z = cumsum(h,2)
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Import, Export, and Conversion finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!