is a magic square test function

is a magic square test function -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 % isMagicSquareTest() -> true/false % Description: % This function tests whether isMagicSquare function evaluates %correctly. function output = isMagicSquareTest() output = true if (isMagicSquare(magic(4)) ~= 1) disp('error calculating isMagicSquare function') output = false
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: elseif(isMagicSquare(magic(3)) ~= 1) disp('error calculating isMagicSquare function') output = false elseif (isMagicSquare([9 8 7 6 5 4 3 2 1]) ~= 0) disp('error calculating isMagicSquare function') output = false else disp('function passed!!') end end...
View Full Document

This note was uploaded on 10/23/2009 for the course CISC 106 taught by Professor Mcgeary during the Fall '08 term at University of Delaware.

Ask a homework question - tutors are online