CodeCodeCode

ENGR132: HW03 - temperature_update

Mar 30th, 2011
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.24 KB | None | 0 0
  1. function temp_update = temperature_update(temp_matrix, row, column)
  2.  
  3. % Refreshes the temperature cell.
  4. temp_update = (temp_matrix(row - 1, column) + temp_matrix(row + 1, column) + temp_matrix(row, column - 1) + temp_matrix(row, column + 1)) / 4;
Advertisement
Add Comment
Please, Sign In to add comment