Important to note this that this is a function file not script, you need to pass parameters to execute this program.
####Step 1. Save "LC_nrz.m" in your current directory of MATLAB
####Step 2. define binary sequence a, e.g. a = [1 0 0 1 1 0 1 0 1 1]
####Step 3. then write [U P B M S]=LC_nrz(a)
###Explaination
###Example
a = [1 0 1 1 0 1 1]
[U P B M S] = LC_nrz(a)
####===========================================