Hi every one;
I am going to make a function that takes matrix A as input(of type double) an return the name of the smallest unsigned integer class to which A can be accurately converted. If no such class exists, the string 'none' is returned. For example, if the largest integer A is 14, then the function would return 'uint8', but if the largest integer in A is 1e20, then the function would return 'none'.
I am using that code. But i have no sure whether i am going correct or not?
function integ=integerize(A)B=max(A);C=max(B);if C==uint8 || C~=uint32 || C~=uint64 integ=uint8;elseif C~=uint8 || C==uint32 || C~=uint64 integ=uint32;elseif C~=uint8 || C~=uint32 ||C~=uint64 integ=uint64;endendWhen i test this code i got an error Feedback: Your program made an error for argument(s) 0 Your solution is _not_ correct.
Kindly guide me where i need corrections, thanks in advance..
Best Answer