how to extract data points from specific positions in a 2D domain

Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to extract data points from specific positions in a 2D domain

James
Hello,

I have a 2D domain. I know I can extract all data points from:

c_data = { 'x', 'y', 'c'};
n_data = length(c_data);
p = fea.grid.p;
Positions = zeros(length(p),n_data);
for i=1:n_data
  Positions(:,i) = evalexpr( c_data{i}, p, fea );
end

My question is how to get the data points at the bottom (i.e. y=0) instead of all points from this 2D domain?

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: how to extract data points from specific positions in a 2D domain

Precise Simulation
Administrator
Since you are using the grid points as evaluation points (https://featool.com/doc/grid#grid_fmt), you can just remove the ones you are not interested in.

    ix_eval = fea.grid.p(2,:) > 0;
    p = fea.grid.p(:,ix_eval):