i have problem with code to make line coding miller. I use this program.
Please help me with a solution.
clc
clear all
l=20;
a=rand(1,l);
a=round(a);
l=length(a);
t=0:(length(a))-1
for i=3:length(a)
b(2*i-1)=a(i)
b(2*i)=a(i)
if a(i)== 1
mill(2*i-1)=1*(mill(2*i-2));
mill(2*i)=-1*mill(2*i-2);
else if a(i)==0 & a(i-1)==0
mill(2*i-1)=-1*(mill(2*i-2));
mill(2*i)=-1*mill(2*i-2);
else
mill(2*i-1)=-1;
mill(2*i)=1;
end
end
end
t1=0:(length(b)-1)
subplot(3,1,1)
stairs(t,a)
ylabel('amplitude')
xlabel('temps')
title('Code A')
axis([0,length(a),-5,5])
grid
subplot(3,1,2)
stairs(t1,b)
ylabel('amplitude')
xlabel('temps')
title('signal binaire B')
axis([0,length(b),-5,5])
grid
subplot(3,1,3)
stairs(t1,mill)
ylabel('amplitude')
xlabel('temps')
title('Code miller')
axis([0,length(b),-5,5])
grid

댓글 수: 4

madhan ravi
madhan ravi 2018년 12월 24일
you can select your code and press the code button so that it‘s easy to read
Image Analyst
Image Analyst 2018년 12월 24일
What is "line coding miller"? I don't know how to make it until I know what it is.
aboubakr ouldja
aboubakr ouldja 2018년 12월 24일
madhan ravi
madhan ravi 2018년 12월 25일
aboubakr ouldja's answer moved here for consistency:
the erore message
??? Undefined function or method 'mill' for input arguments of type 'double'.
Error in ==> miller at 12
mill(2*i-1)=1*(mill(2*i-2));

댓글을 달려면 로그인하십시오.

답변 (1개)

madhan ravi
madhan ravi 2018년 12월 25일

0 개 추천

You haven't defined any variable named mill.
P.S - I have no idea what your trying to do though..

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

질문:

2018년 12월 24일

편집:

2018년 12월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by