sum all integers in a vector test

sum all integers in a vector test - disp'error calculating...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 % sumIntsFunction(number) -> number % Description: % This function evaluates the function sumInts() and returns the result true % or false as a number function output = sumIntsTest() output = true if (sumInts(3) ~= 6) disp('error calculating sumInts(3)') output = false elseif (sumInts(10) ~= 55)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: disp('error calculating sumInts(10)') output = false elseif (sumInts(300) ~= 45150) disd('error calculating sumInts(300)') output = false elseif (sumInts(100) ~= 5050) disp('error calculating sumInts(100)') output = false else disp('sumIntsTest passed') 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