Good day,

Please, I need help:

I have this signed-distance function code and I need to implement it directly inside Comsol (please, note that I do not want to couple Comsol with Matlab), but I am having difficulty. How can I go about it?

Thank you so much.

W=2;

H=1;

cx2 = W / 200 * [ 40 160 1 0 1 0 200 29 57.5 86 114.5 143 171.5 199 29 57.5 86 114.5 143 171.5 199 200 200 0 200 40 160];

cy2 = H / 100 * [ 0 0 25 50 75 100 25 25 25 25 25 25 25 25 75 75 75 75 75 75 75 50 100 80 80 100 100];

for i = 1 : length( cx2 )

tp( :, i ) = - sqrt ( ( x - cx2 ( i ) ) .^2 + ( y - cy2 ( i ) ) .^2 ) +H/7.6;

end;

Phi2 = -(max(tp.')).';

More Samuel Ayinde's questions See All
Similar questions and discussions