Question: 1) The program below uses the given functions to eliminate all the redundant numbers stored in the array which is taken from the user, (the

 1) The program below uses the given functions to eliminate all

1) The program below uses the given functions to eliminate all the redundant numbers stored in the array which is taken from the user, (the user continuously enters integer numbers and finally enters -1 to end entering numbers but the lastly entered -1 will not be included in the array) please correct the error(s) if there is/are... myprogram.m 2. 3. S. 6. 7. 8. the array'); clear clc x=-1; array(); while X-1 clc; disp('Enter -1 to end entering new values to x=input(':'); while X-=-1 array(cnt)=x; cntcnt+1; end end array -eleminate_the_redundant (array) 10. 11. 12. 13. 14. myfunction.m 1. 2. 3. 5. 7. function array-eleminate_the_redundant (array) for i=1: length(array) for j=1:1 if array(i)==array ( ) array(i)=-1; break; end end end for i=1:length(array) if array(i)=-1 array2 (k)=array(i); k=k+1; end end 9. 10. 11. 12 13. 14. 15

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!