jose adan barboza torrealba30 de Marzo del 2010
function varargout = TRANSMISIONES(varargin)
% TRANSMISIONES M-file for TRANSMISIONES.fig
% TRANSMISIONES, by itself, creates a new TRANSMISIONES or raises the existing
% singleton*.
%
% H = TRANSMISIONES returns the handle to a new TRANSMISIONES or the handle to
% the existing singleton*.
%
% TRANSMISIONES(\'CALLBACK\',hObject,eventData,handles,...) calls the local
% function named CALLBACK in TRANSMISIONES.M with the given input arguments.
%
% TRANSMISIONES(\'Property\',\'Value\',...) creates a new TRANSMISIONES or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before TRANSMISIONES_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to TRANSMISIONES_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE\'s Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
format long
Kk=2.54;
% Last Modified by GUIDE v2.5 11-Apr-2008 22:23:30
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(\'gui_Name\', mfilename, ...
\'gui_Singleton\', gui_Singleton, ...
\'gui_OpeningFcn\', @TRANSMISIONES_OpeningFcn, ...
\'gui_OutputFcn\', @TRANSMISIONES_OutputFcn, ...
\'gui_LayoutFcn\', [] , ...
\'gui_Callback\', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before TRANSMISIONES is made visible.
function TRANSMISIONES_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to TRANSMISIONES (see VARARGIN)
% Choose default command line output for TRANSMISIONES
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes TRANSMISIONES wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = TRANSMISIONES_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit1 as text
% str2double(get(hObject,\'String\')) returns contents of edit1 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit1=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit2 as text
% str2double(get(hObject,\'String\')) returns contents of edit2 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit2=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit3 as text
% str2double(get(hObject,\'String\')) returns contents of edit3 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit3=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit4 as text
% str2double(get(hObject,\'String\')) returns contents of edit4 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit4=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit5 as text
% str2double(get(hObject,\'String\')) returns contents of edit5 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit5=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,\'String\') returns popupmenu1 contents as cell array
% contents{get(hObject,\'Value\')} returns selected item from popupmenu1
rG=[0;0;0.609;0.642;0.680;0.684;0.721;0.741;0.743;0.783;0.814;0.846;0.858;0.883;0.879;0.914;0.927;0.977;0.990;1.108;1.063;1.165;1.196;1.213;1.259;1.293;1.345;1.382;1.427;1.465;1.502;1.545;1.762;0];
rg=rG(get(hObject,\'value\'));
set(handles.edit6,\'string\',rg/2)
if get(hObject,\'value\')==1
set(handles.edit6,\'string\',\'RADIO?????\')
elseif get(hObject,\'value\')==2
set(handles.edit6,\'string\',\'RADIO?????\')
elseif get(hObject,\'value\')==34
set(handles.edit6,\'string\',\' \')
end
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit6 as text
% str2double(get(hObject,\'String\')) returns contents of edit6 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit6=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
% --- Executes on selection change in popupmenu2.
function popupmenu2_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,\'String\') returns popupmenu2 contents as cell array
% contents{get(hObject,\'Value\')} returns selected item from popupmenu2
rF=[0;0;0.609;0.642;0.680;0.684;0.721;0.741;0.743;0.783;0.814;0.846;0.858;0.883;0.879;0.914;0.927;0.977;0.990;1.108;1.063;1.165;1.196;1.213;1.259;1.293;1.345;1.382;1.427;1.465;1.502;1.545;1.762;0];
rf=rF(get(hObject,\'value\'));
set(handles.edit7,\'string\',rf/2)
if get(hObject,\'value\')==1
set(handles.edit7,\'string\',\'RADIO?????\')
elseif get(hObject,\'value\')==2
set(handles.edit7,\'string\',\'RADIO?????\')
elseif get(hObject,\'value\')==34
set(handles.edit7,\'string\',\' \')
end
% --- Executes during object creation, after setting all properties.
function popupmenu2_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit7 as text
% str2double(get(hObject,\'String\')) returns contents of edit7 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit7=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
A=handles.edit1;
B=handles.edit2;
C=handles.edit3;
D=handles.edit4;
E=handles.edit5;
F=handles.edit9;
G=handles.edit8;
% --- Executes on button press in pushbutton2.
close
%haora viene lo bueno
letra=char(\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\',\'i\',\'j\',\'k\',\'l\',\'m\',\'n\',\'o\',\'p\',\'q\',\'r\',\'s\',\'t\',\'u\',\'v\',\'w\',\'x\',\'y\',\'z\',\'A\',\'B\',\'C\',\'D\',\'E\',\'F\',\'G\',\'H\',\'I\',\'J\',\'K\',\'L\',\'M\',\'N\',\'O\',\'P\',\'Q\',\'R\',\'S\',\'T\',\'U\',\'V\',\'W\',\'X\',\'Y\',\'Z\');
for u=1:A
title(\'CONFIGURACION GEOMETRICA DE LOS CABLES DE GUARDA LINEA DE TRANSMISION\');
xlabel(\'DISTANCIA HORIZONTAL\');
ylabel(\'DISTANCIA VERTICAL\');
axis([0 E D C]);
grid minor;
[x,y]=ginput(1);
x;
y;
xz=x+E/100;
xp=x-E/100;
yz=y+C/100;
yp=y-C/100;
color=[1/(2*u^2) u/(A) 1/(u^1.5)];
axis([xp xz yp yz]);
grid on;
[x,y]=ginput(1);
x;
y;
plot(x,y,\'Color\',color,\'Marker\',\'.\',\'MarkerSize\',24);
text(x,y,{ \'\',\'\',letra(u)})
p(u)=x;
h(u)=y;
hold on;
grid off;
end
for u=1:B
title(\'CONFIGURACION GEOMETRICA DE LOS CABLES DE FASE LINEA DE TRANSMISION\');
xlabel(\'DISTANCIA HORIZONTAL\');
ylabel(\'DISTANCIA VERTICAL\');
axis([0 E D C]);
grid minor;
[x,y]=ginput(1);
x;
y;
xz=x+E/100;
xp=x-E/100;
yz=y+C/100;
yp=y-C/100;
color1=[u/(B) 1/(u^1.5) 1/(2*u^2)];
axis([xp xz yp yz]);
grid on;
[x,y]=ginput(1);
x;
y;
plot(x,y,\'Color\',color1,\'Marker\',\'.\',\'MarkerSize\',24);
text(x,y,{ \'\',\'\',letra(u+A)})
k(u)=x;
t(u)=y;
hold on;
grid off;
end
legend(\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\',\'i\',\'j\',\'k\',\'l\',\'m\',\'n\',\'o\',\'p\',\'q\',\'r\',\'s\',\'t\',\'u\',\'v\',\'w\',\'x\',\'y\',\'z\',\'A\',\'B\',\'C\',\'D\',\'E\',\'F\',\'G\',\'H\',\'I\',\'J\',\'K\',\'L\',\'M\',\'N\',\'O\',\'P\',\'Q\',\'R\',\'S\',\'T\',\'U\',\'V\',\'W\',\'X\',\'Y\',\'Z\')
title(\'CONFIGURACION GEOMETRICA DE LA LINEA DE TRANSMISION\');
axis([0 E D C]);
grid minor;
grid off
%dfisdugfhfghaquin borro
rg=F
rf=G
% Define the context menu
cmenu = uicontextmenu;
cmenu1 = uicontextmenu;
% Define the line and associate it with the context menu
for i=1:(A)
hline1 = plot(p(i),h(i), \'UIContextMenu\', cmenu1);
end
% Define callbacks for context menu items
cb1 = [\'set(hline1)\',\'value\', letra(i)];
% Define the context menu items
item1 = uimenu(cmenu1, \'Label\',\'ACOPLAR CABLES DE GUARDA:\');
id_EDITAR=uimenu(item1,\'Label\',\'ACOPLAR\',\'CallBack\',\'ACOPLAMIENTO\');
for i=1:(B)
hline = plot(k(i),t(i), \'UIContextMenu\', cmenu);
end
% Define callbacks for context menu items
cb1 = [\'set(hline)\'];
% Define the context menu items
item2 = uimenu(cmenu, \'Label\',\'ACOPLAR CABLES DE FASE:\');
id_EDITAR1=uimenu(item2,\'Label\',\'ACOPLAR\',\'CallBack\',\'ACOPLAMIENTO\');
%fgjhgfjhfgaqui booo
clc
g=ones(A,2);
for i=1:A
for j=1:2
if j==1
g(i,j)=p(i);
else
g(i,j)=h(i);
end
end
end
g
f=ones(B,2);
for i=1:B
for j=1:2
if j==1
f(i,j)=k(i);
else
f(i,j)=t(i);
end
end
end
f
%function demo
% Customize datatip string to display \'Amplitude\' and
format rat
% \'Time\'.
Bij=zeros(A+B,A+B);
for i=1:(B)
for j=1:B
if i==j
Bij(i,j)=log((2*t(i))/rf);
else
Bij(i,j)=log((distance(k(i),t(i),k(j),-t(j))/distance(k(i),t(i),k(j),t(j))));
end
end
end
for i=1:(A)
for j=1:(A)
if i==j
Bij((i+B),(j+B))=log((2*h(i))/rg);
else
Bij((i+B),(j+B))=log(distance(p(i),h(i),p(j),-h(j))/distance(p(i),h(i),p(j),h(j)));
end
end
end
for i=1:(B)
for j=1:(A)
Bij((i),(j+B))=log(distance(k(i),t(i),p(j),-h(j))/distance(k(i),t(i),p(j),h(j)));
end
end
for i=1:(A)
for j=1:(B)
Bij((i+B),(j))=log(distance(p(i),h(i),k(j),-t(j))/distance(p(i),h(i),k(j),t(j)));
end
end
Bij
%pause
%dh
checkLabels = {\'MATRIZ DE INDUCCION Bij:\'...
\'Nº DE C. DE GUARDA:\'...
\'Nº DE C. DE FASE:\'};
varNames = {\'Bij\',\'A\',\'B\'};
items = {(Bij),(A),(B)};
export2wsdlg(checkLabels,varNames,items,...
\'CONFIRMACION\');
clc;Bij
%jtrsrt
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clf
close TRANSMISIONES
% --- Executes on button press in radiobutton1.
function radiobutton1_Callback(hObject, eventdata, handles)
% hObject handle to radiobutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear Kk;
Kk=2.54;
% Hint: get(hObject,\'Value\') returns toggle state of radiobutton1
set(handles.text6,\'string\',\'[cm]\')
set(handles.text7,\'string\',\'[cm]\')
set(handles.text8,\'string\',\'[cm]\')
% --- Executes on button press in radiobutton2.
set(handles.edit9,\'string\',handles.edit6*Kk)
set(handles.edit8,\'string\',handles.edit7*Kk)
set(handles.text14,\'string\',\'[cm]\')
set(handles.text13,\'string\',\'[cm]\')
function radiobutton2_Callback(hObject, eventdata, handles)
% hObject handle to radiobutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear Kk;
Kk=0.0254;
% Hint: get(hObject,\'Value\') returns toggle state of radiobutton2
set(handles.text6,\'string\',\'[m]\')
set(handles.text7,\'string\',\'[m]\')
set(handles.text8,\'string\',\'[m]\')
% --- Executes on button press in radiobutton3.
set(handles.edit9,\'string\',handles.edit6*Kk)
set(handles.edit8,\'string\',handles.edit7*Kk)
set(handles.text14,\'string\',\'[m]\')
set(handles.text13,\'string\',\'[m]\')
function radiobutton3_Callback(hObject, eventdata, handles)
% hObject handle to radiobutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear Kk;
Kk=1;
% Hint: get(hObject,\'Value\') returns toggle state of radiobutton3
set(handles.text6,\'string\',\'[in]\')
set(handles.text7,\'string\',\'[in]\')
set(handles.text8,\'string\',\'[in]\')
% --- Executes on button press in radiobutton4.
set(handles.edit9,\'string\',handles.edit6*Kk)
set(handles.edit8,\'string\',handles.edit7*Kk)
set(handles.text14,\'string\',\'[in]\')
set(handles.text13,\'string\',\'[in]\')
function radiobutton4_Callback(hObject, eventdata, handles)
% hObject handle to radiobutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
clear Kk;
Kk=1/12;
% handles structure with handles and user data (see GUIDATA)
set(handles.text6,\'string\',\'[ft]\')
set(handles.text7,\'string\',\'[ft]\')
set(handles.text8,\'string\',\'[ft]\')
% Hint: get(hObject,\'Value\') returns toggle state of radiobutton4
set(handles.edit9,\'string\',handles.edit6*Kk)
set(handles.edit8,\'string\',handles.edit7*Kk)
set(handles.text14,\'string\',\'[ft]\')
set(handles.text13,\'string\',\'[ft]\')
function edit8_Callback(hObject, eventdata, handles)
% hObject handle to edit8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit8 as text
% str2double(get(hObject,\'String\')) returns contents of edit8 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit8=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit8_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end
function edit9_Callback(hObject, eventdata, handles)
% hObject handle to edit9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,\'String\') returns contents of edit9 as text
% str2double(get(hObject,\'String\')) returns contents of edit9 as a double
NewStrVal=get(hObject,\'String\');
NewVal=str2double(NewStrVal);
handles.edit9=NewVal;
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit9_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,\'BackgroundColor\'), get(0,\'defaultUicontrolBackgroundColor\'))
set(hObject,\'BackgroundColor\',\'white\');
end