Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

>> Please show all the steps of the MATLAB function Write a function nybblise wh

ID: 1992863 • Letter: #

Question

>> Please show all the steps of the MATLAB function

Write a function nybblise which takes as input digital signal of 0's and 1's stored in a vector of size N x 1. and breaks it into four 4-bit nybbles, which are returned as the columns of a 4 x N/4 matrix. For example, the 16 bit input should be mapped as di dis dg 13 d2 de 10 14 ds d7 11 15 Lodi ds d d d16 12 16. Your function must return -1 if the N is not a multiple of 4 Following is the signature of the function. function A nybblise (d) Input d digital signal as a vector of size N x 1 output A nybbles as a 4 x N/4 matrix OR 1 if N is not a multiple of 4 Note: This function must use loops rather than MATLAB built-in functions such as reshape, fliplr, flipud. If you do not use loops, you will not receive any marks for the test output, even if test cases pass.

Explanation / Answer

r1=1;

r2=N;

N=input('Enter a number:');

d=[r2:r1];

if(N%4==0)

A=reshape(d,4,4);

disp('the matrix is :');

else

A=-1;

end;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote