Borrar filtros
Borrar filtros

Undefined function or variable 'untitled1_OutputFcn'. Error in gui_mainfcn (line 264) feval(gui_​State.gui_​OutputFcn, gui_hFigure, [], gui_Handles); Error in untitled1 (line 42) gui_mainfcn(gui_State, varargin{:});

1 visualización (últimos 30 días)
The ERROR : Undefined function or variable 'untitled1_OutputFcn'.
Error in gui_mainfcn (line 264)
feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);
Error in untitled1 (line 42)
gui_mainfcn(gui_State, varargin{:});
This is my code
function varargout = untitled1(varargin)
% UNTITLED1 MATLAB code for untitled1.fig
% UNTITLED1, by itself, creates a new UNTITLED1 or raises the existing
% singleton*.
%
% H = UNTITLED1 returns the handle to a new UNTITLED1 or the handle to
% the existing singleton*.
%
% UNTITLED1('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in UNTITLED1.M with the given input arguments.
%
% UNTITLED1('Property','Value',...) creates a new UNTITLED1 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before untitled1_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to untitled1_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
% Edit the above text to modify the response to help untitled1
% Last Modified by GUIDE v2.5 13-Nov-2019 16:26:32
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @untitled1_OpeningFcn, ...
'gui_OutputFcn', @untitled1_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
function untitled1_OpeningFcn(hObject, ~, 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 untitled1 (see VARARGIN)
%common parameters
handles.f=3.5; %Frequency band [GHz]
handles.pt=40; %transmitter power[dBm]
handles.pr=27; %Receiver power[dBm]
handles.n=6; %Noise figure [dBm]
handles.ht=5; %Transmitter antenna height(km)
handles.hr=0.005; %Receiver antenna height(km)
handles.Amu=20; %The median attenuation relative to free space
handles.gt=17; %Transmitter Antenna Gain [dBi]
handles.gr_s=15; %Receiver Antenna Gain [dBi] (stations)
handles.gr_h=2; %Receiver Antenna Gain [dBi] (handset)
handles.B=10; %Bandwidth [MHz]
handles.L=0.3; %Connector loss [dB]
handles.I=3; %Interference margin loss [dB]
handles.d=0:5:50; %The range of the distance between TX and RX
% Choose default command line output for untitled1
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% --- Executes just before untitled1 is made visible.
function Urban_Callback(~, ~, ~)
% hObject handle to Urban (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Okumura Propagation Model
Lf=32.44+20*log(f)+20*log(d); %Free Space Propagation Loss
Ght=20*log(ht/200); %Transmitter Antenna Height Gain Factor
if(hr<3) %Reciver Antenna Height Gain Factor
Ghr=20*log(hr/3);
else
Ghr=10*log(hr/3);
end
Garea=13;
L50=Lf+Amu-Ght-Ghr-Garea;
Rss= pt+gt+gr_s-L50-L;
SNIR= Rss/n+I;
c=B*log(1+SNIR);
throuput1=(c.*(B*log2(1+(10^(SNIR/10)))));
hold on;
figure (1)
axes(handles.axes1);
handles.axes1=min(0):max(50);
plot(d,L50,'LineWidth',1.5)
title('Okumura Model Analysis- Urban');
xlabel(' distance (Km)');
ylabel('Propagation Path loss(dB)');
% --- Executes on button press in Suburban.
function Suburban_Callback(~, ~, ~)
% hObject handle to Suburban (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 Rural.
function Rural_Callback(~, ~, ~)
% hObject handle to Rural (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

Respuestas (0)

Categorías

Más información sobre Analysis, Benchmarking, and Verification en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by