{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

square of sum all integers in a vector test

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

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

View Full Document Right Arrow Icon
Sheet1 Page 1 % sumIntSquareFunction(number) -> number % Description: % This function evaluates the function sumIntSquare() and returns the result true % or false as a number function output = sumIntSquareTest() output = true if (sumIntSquare(1) ~= 1) disp('error calculating sumIntSquare(1)') output = false elseif (sumIntSquare(3) ~= 14)
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 sumIntSquare(3)') output = false elseif (sumIntSquare(4) ~= 30) disd('error calculating sumIntSquare(4)') output = false elseif (sumIntSquare(10) ~= 385) disp('error calculating sumIntSquare()') output = false else disp('sumIntSquareTest passed') end...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online