s2) t=1:length(e); stairs(t-1,e) axis([0 length(e) -2 2]) xlabel( 'AMI ±à?? ' ); grid minor ; axes(handles.axes3) t=1:length(l); stairs(t-1,l) axis([0 length(l) -2 2]) xlabel( 'AMI ò??? ' ); grid minor ;% hObject handle to ami (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % --- Executes on button press in cmi. function cmi_Callback(hObject, eventdata, handles) user_string=get(handles.edit, 'string' ); a=dec2bin(user_string,8); b=a'; c=b(:); d=c'; f=str2num(d(1)); for i=2:length(d) f=[f str2num(d(i))]; end f=[f 0]; %%%%%%%%%%%% ±à?? %%%%%%%%%%%%% m=1; p=-1; for i=1:length(f) if (f(i)==1&m==1) s(i)=3; m=m*p; else if (f(i)==1&m==-1) s(i)=0; m=m*p; else s(i)=1; end end end k=dec2bin(s,2); l=k'; x=l(:);