I have written a code which shows a particular region of interest (see figure). I now want to get the cartesian coordinates (x,y,z) of each and every point in this region.
Code is as following:
clc;close all;clear all;x = linspace(0.5,49.5,100);y = linspace(0,4.8,100);z = linspace(2.5,4.4,100);[X,Y,Z]=meshgrid(x,y,z);v = X.*Y.*Z; %Creating a volume region
% Data defining a surface
[xs, ys] = meshgrid(x,y);zs = 2.5+(tand(22).*ys);%Defining the slope of the roof
% Slice along it
slice(X, Y, Z, v, xs, ys, zs);colorbar
Best Answer