Homework I, Problem I
- %This is posted and ran in a separate file before running the code below.
- %Again, this is posted in a separate file named 'triang'.
- %The issue I am having is the error in live five reads: "Not enough input arguments.Error in triang (line 5)[m,n]=size(A);"
- function B= triang(A)
- %%%Input A--> Matrix for m*n for the size
- %%%Output B--> Is the upper triangular matrix of the same size
- [m,n]=size(A); %This is the line I am having issues with.
- for k=1:m-1
- for i=k+1:m
- for j=(k):n
- B = A;
RAW Paste Data