<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<pre>I am writing this email because i have some problems with Scilab.<br>Firstly,i have one .sce file in wich a programmed two radiobuttoms with some<br>sentences to select only one each time. <br>When i run this .sce file i do not have problems. But this .sce file is<br>called from a previous one. And when i do this, the radiobuttoms  <br>do not work as i hope. There is an "error 4" with Valor2_opc and Valor_opc<br>,i know that this error means "Undefined variable", but the Valor2_opc <br>and Valor_opc are not variables, are functions. <br>These are the sentences of the .sce file where are the functions:<br><br>v_opc = figure(1, ...<br>"figure_name", "Primer orden sistema mecanico",...<br>"backgroundcolor", [0.6 0.2 0.2], ...<br>"position", [200 100 600 400]);<br><br>delmenu(v_opc.figure_id, ...<br>gettext("&File"));<br>delmenu(v_opc.figure_id, ...<br>gettext("&Tools"));<br>delmenu(v_opc.figure_id, ...<br>gettext("&Edit"));<br>delmenu(v_opc.figure_id, ...<br>gettext("&?"));<br>toolbar(v_opc.figure_id, "off");<br><br>m1_opc = uimenu(v_opc, ...<br>"label", "Archivo");<br>m11_opc = uimenu(m1_opc, ...<br>"label", "Salir", ...<br>"callback", "exit");<br>m2_opc = uimenu(v_opc, ...<br>"label", "Ayuda");<br>m21_opc = uimenu(m2_opc,...<br>"label", "Acerca de", ...<br>"callback", "about()");<br><br>marco_opc = uicontrol( v_opc, ...<br>"style", "frame", ...<br>"relief", "groove", ...<br>"units", "pixels", ...<br>"position", [50 20 500 350],...<br>"background", [0.8 0.8 0.8]);<br><br>tit_opc = uicontrol(marco_opc, ...<br>"style", "text", ...<br>"string", "Elija una opcion: ", ...<br>"position", [30 300 150 45], ...<br>"backgroundcolor", [0.8,0.8, 0.8], ...<br>"fontname","Times",...<br>"fontsize", 20, ...<br>"fontweight", "demi", ...<br>"horizontalalignment", "center");<br><br>Primer_Orden_opc = uicontrol(marco_opc, ...<br>"style" , "radiobutton", ...<br>"string" , "Analogias con modelos de Primer Orden", ...<br>"position", [110 260 350 50], ...<br>"fontname","Times",...<br>"fontsize", 12, ...<br>"fontweight", "bold", ...<br>"min", 0, "max", 1, ...<br>"value", 1, ...<br>"callback","Validar_opc",...<br>"background", [0.8 0.8 0.8]);<br><br>lista1_opc = uicontrol(marco_opc, ...<br>"style", "listbox", ...<br>"position", [200 160 200 100], ...<br>"string", ...<br>["Analogia con modelo mecanico", "Analogia con modelo termico"], ...<br>"fontname","Times",...<br>"fontsize", 12, ...<br>"fontweight", "bold", ...<br>"backgroundcolor", [0.8 0.8 0.8]);<br><br>Segundo_Orden_opc = uicontrol(marco_opc, ...<br>"style" , "radiobutton", ...<br>"string" , "Analogias con modelos de Segundo Orden", ...<br>"position", [110 150 350 50], ...<br>"fontname","Times",...<br>"fontsize", 12, ...<br>"fontweight", "bold", ...<br>"min", 0, "max", 1, ...<br>"value", 0, ...<br>"callback","Validar2_opc",...<br>"background", [0.8 0.8 0.8]);<br><br><br>lista2_opc = uicontrol(marco_opc, ...<br>"style", "listbox", ...<br>"position", [200 60 200 80], ...<br>"string", ...<br>["Analogia con modelo mecanico", "Analogia con modelo termico"], ...<br>"fontname","Times",...<br>"fontsize", 12, ...<br>"fontweight", "bold", ...<br>"backgroundcolor", [0.8 0.8 0.8]);<br><br>Aceptar_opc = uicontrol(marco_opc, ...<br>"style", "pushbutton", ...<br>"position", [400 20 70 35], ...<br>"backgroundcolor",[0.7 0.6 0.6], ...<br>"foregroundcolor", [0 0 0], ...<br>"string", "Aceptar",...<br>"fontsize",12, ...<br>"fontweight", "bold",...<br>"relief","sunken",...<br>"callback", "Simulacion");<br><br>function Validar_opc<br>set(Primer_Orden_opc,'value',1); <br>set(Segundo_Orden_opc,'value',0);<br>endfunction<br><br>function Validar2_opc <br>set(Primer_Orden_opc,'value',0); <br>set(Segundo_Orden_opc,'value',1);<br>endfunction<br><br>function Simulacion<br>clf(v_opc);<br>exec('Primer_Orden_Mecanico.sce');<br>endfunction<br><br> <br>Well, i hope you can help me to solve this problem. <br>Yours faithfully,<br>Luciana Liria<br>              </pre>                                     <br /><hr /> <a href='' target='_new'></a></body>
</html>