From: Ryan Cotterill on 6 May 2010 14:30 Im using mask to set where temperatures need to go. Basically its a rectangle box with a hole through it, the hole has a liquid of 80 degrees C going through it and the outer edges of the rectangular shape are at 20 degrees. So I got my mask matrix to have 0's where the hole is and i need to assign the 80 degree temperature to this hole of 0's. From what I have the mask comes out ok with 0's in the right place but after that the matrix seems to change size. Any ideas? tedge = 20; tcore = 80; side = 100; h = 2.5; [x y] = meshgrid(-side/2:h:side/2,-side/2:h:side/2); [M N] = size(x); Rcore = 19.05; mask = (x.^2 + y.^2) > Rcore^2; %assign boundary conditions for x = 1:41 for y = 1:41 if mask(x,y) == 0; X(x,y)=tcore; end end end
|
Pages: 1 Prev: dcm2nii use in matlab Next: Very small numbers approximated with 0? |