The following MATLAB function PoS.m counts the number of elements that are greater than 10. You can assume that the input argument is a vector. Find FIVE errors in PoS.m shown below. List the line...


The following MATLAB function PoS.m counts the number of elements that are greater than 10.<br>You can assume that the input argument is a vector.<br>Find FIVE errors in PoS.m shown below. List the line number and explain the error.<br>PoS.m<br>FUNCTION [count] = PoS(mat)<br>% this function counts number of elements greater than 10<br>1<br>%3D<br>2<br>3<br>4<br>length(mat) = num;<br>count = 0;<br>for i = num<br>7<br>8<br>if mat > 10<br>9.<br>count + 1;<br>10<br>end<br>11<br>end<br>12<br>13<br>end<br>

Extracted text: The following MATLAB function PoS.m counts the number of elements that are greater than 10. You can assume that the input argument is a vector. Find FIVE errors in PoS.m shown below. List the line number and explain the error. PoS.m FUNCTION [count] = PoS(mat) % this function counts number of elements greater than 10 1 %3D 2 3 4 length(mat) = num; count = 0; for i = num 7 8 if mat > 10 9. count + 1; 10 end 11 end 12 13 end

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here