Question: I cant get my code to pass all the pretest, what should i add to my code? Matlab code please. Fill in the given template

I cant get my code to pass all the pretest, what should i add to my code?
Matlab code please.
Fill in the given template to create a function nonpivotcols that takes a general mxn matrix as input and produces a matrix consisting of the nonpivot columns of the input matrix. Function 0 \begin{tabular}{l|l} 1 & function npc=nonpivotcols(A) \\ 2 & \\ 3 & {[R pcols ]=rref(A);} \\ 4 & A(:,pcols)=[]; \\ 5 & \\ 6 & {[r,fcols]=size(A);} \\ 7 & \\ 8 & npc=A(:,fcols); \\ 9 & end \end{tabular} Code to call your function ? Test on input zeros(4,6) (no pivot columns) (Pretest) Variable result must be of size [4 6]. It is currently of size [4 1 1]. Check where the variable is assigned a value. Test Code: \begin{tabular}{l|l} 1 & A= zeros (4,6); \\ 2 & result = nonpivotcols (A); \\ 3 & refresult = reference.nonpivotcols (A); \\ 4 & assessvariableEqual ('result', refresult); \end{tabular} Output: fols=
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
