Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How to set graphics in diferents axes in a same GUI
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi guys, I need your help, I'm working in a line codificator and my problem is when I push the buttom "ejecutar" the graphic appear in the the same axes, I've codificated all the buttoms "ejecutar" for separate, the idea is when i push the buttom ejecutar the graphic have to appear in the correct axes.
I don't know where I have to change the code for fix that, thanks for your help guys.
Mi code is the next:
a=str2double(get(handles.edit1,'String'));
b=str2double(get(handles.edit2,'String'));
c=str2double(get(handles.edit3,'String'));
d=str2double(get(handles.edit4,'String'));
e=str2double(get(handles.edit5,'String'));
f=str2double(get(handles.edit6,'String'));
g=str2double(get(handles.edit7,'String'));
h=str2double(get(handles.edit8,'String'));
i0=str2double(get(handles.edit9,'String'));
j0=str2double(get(handles.edit10,'String'));
handles.bits=[a,b,c,d,e,f,g,h,i0,j0];
handles.cod=get(hObject,'Value');
hold off;
h =handles.bits;
n=1;
h(11)=1;
ami=-1;
while n<=10;
t=n-1:0.001:n;
if h(n) == 0
if h(n+1)==0
y=(t>n);
else
if ami==1
y=-(t==n);
else
y=(t==n);
end
end
d=plot(t,y);title('AMI NRZ');grid on
set(d,'LineWidth',2.5);
hold on;
axis([0 10 -1.5 1.5]);
else
ami=ami*-1;
if h(n+1)==0
if ami==1
y=(t<n);
else
y=-(t<n);
end
else
if ami==1
y=(t<n)-(t==n);
else
y=-(t<n)+(t==n);
end
end
d=plot(t,y);title('AMI NRZ');grid on;
set(d,'LineWidth',2.5);
hold on;
axis([0 10 -1.5 1.5]);
end
n=n+1;
end
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!