⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 radarsim2.m

📁 高频地波雷达完整仿真matlab程序 网上找到的
💻 M
📖 第 1 页 / 共 5 页
字号:
% ***********************************************************************% *                                                                     *% *   HFRSIM (RELAESE 2.1   31/07/2006  ).                              *% *   COPYRIGHT (C)   HIT EIE  2006.                                    *% *                                                                     *% ***********************************************************************% % ================================================================% =   MODIFIED FOR MATLAB Version 7.0.4.365 (R14) Service Pack 2 = % =   FOR WINDOWS PERSONAL COMPUTERS                             =% =   July 2006                                                  =% =   Mr. Zhou Yang                                              =% =   Harbin Institute of Technology                             =% =   mailto:hallychou@hotmail.com                               =% ================================================================function varargout = radarsim(varargin)%RADARSIM M-file for radarsim.fig%      RADARSIM, by itself, creates a new RADARSIM or raises the existing%      singleton*.%%      H = RADARSIM returns the handle to a new RADARSIM or the handle to%      the existing singleton*.%%      RADARSIM('Property','Value',...) creates a new RADARSIM using the%      given property value pairs. Unrecognized properties are passed via%      varargin to radarsim_OpeningFcn.  This calling syntax produces a%      warning when there is an existing singleton*.%%      RADARSIM('CALLBACK') and RADARSIM('CALLBACK',hObject,...) call the%      local function named CALLBACK in RADARSIM.M with the given input%      arguments.%%      *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 radarsim% Last Modified by GUIDE v2.5 26-Nov-2006 23:58:15% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @radarsim_OpeningFcn, ...                   'gui_OutputFcn',  @radarsim_OutputFcn, ...                   'gui_LayoutFcn',  [], ...                   'gui_Callback',   []);if nargin && ischar(varargin{1})   gui_State.gui_Callback = str2func(varargin{1});endif 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 radarsim is made visible.function radarsim_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   unrecognized PropertyName/PropertyValue pairs from the%            command line (see VARARGIN)% Choose default command line output for radarsimhandles.output = hObject;% Update handles structureguidata(hObject, handles);% axes(handles.axesEr);% % 动态显示图形坐标值% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% dynpoint(handles.axesEr);% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 工具栏%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% set(hObject,'Toolbar','figure');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 菜单%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% set(handles.figure1,'Menubar','default')%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 按钮控件的背景设置%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%load grCData;% X_help=imread('G:\Documents and Settings\zhouyang\桌面\help.tif');% X_close=imread('G:\Documents and Settings\zhouyang\桌面\close.tif');% X_graph=imread('G:\Documents and Settings\zhouyang\桌面\graph.jpg');% X_table=imread('G:\Documents and Settings\zhouyang\桌面\table.jpg');% X_plotbrowser=imread('G:\Documents and Settings\zhouyang\桌面\plotbrowser.jpg');% save grCData;% set(handles.grHelp,'CData',X_help);% set(handles.grClose,'CData',X_close);% set(handles.grUpStrip,'CData',X_larrow);% set(handles.grDownStrip,'CData',X_rarrow);set(handles.grGraph,'CData',X_graph);set(handles.grTable,'CData',X_table);% set(handles.grPlotBrowser,'CData',X_plotbrowser);% [X_up map_up]=imread('G:\Documents and Settings\zhouyang\桌面\up.ico');% RGB_up = ind2rgb(X_up,map_up);% set(handles.grUpStrip,'CData',RGB_up);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Mparam.ans=320;  % The refractivity of the troposphere at the surface of the earth in N-units.Mparam.hscale=7.50;  % The scale height of the troposphere in kilometres.Mparam.FMin=5.000;  % The minimum frequency in MHz.Mparam.FMax=100.000;  % The maximum frequency in MHz.Mparam.FStep=5.000;  % The frequency step.Mparam.epslon=80;    % The relative permittivity of the surface of the earth.Mparam.sigma=4.00;   % The conductivity of the surface of the earth in S/m.Mparam.dmin=100;  % The minimum range in kilometres.Mparam.dmax=1000; % The maximum range in kilometres.Mparam.dstep=50;  % The range step. See LOGLIN for further explanation.Mparam.hrr=0; % The receiver height in metres.Mparam.htt=0;   % The transmitter height in metres.Mparam.u=10.28;  %The wind speed in m/s.Mparam.PrSigma = 1000;  % 雷达目标散射面积。Mparam.Ls = 10; % 雷达系统损失。Mparam.Po = 1; % 发射功率。Mparam.Pt = 50; % 峰值发射功率。Mparam.Gamma = 0.5;   % 发射信号占空比。Mparam.Do = 3; % 天线增益。Mparam.Dt = 20; % 发射天线方向性系数。Mparam.Dr = 10; % 接收天线方向性系数。Mparam.UD = 2.62; % 风向 弧度(海杂波功率谱计算)。Mparam.DeltaR = 5000;  % 距离分辨率。Mparam.ThetaB = 0.087;  % 角度分辨率。Mparam.siFreq=10.000;   % 雷达发射频率 MHz(海浪散射截面计算)。Mparam.siU=10.28;   % 风速 m/s(海浪散射截面计算)。Mparam.siUD=2.62;   % 风向 弧度(海浪散射截面计算)。Mparam.OmgB=1;  % 多普勒频率 Hz。Mparam.Ti=70;    % 雷达信号相参处理时间 s。% Mparam.Fa = 40; % 环境噪声因子 dB。Mparam.season=1;    % l=WINTER, 2=SPRING, 3=SUMMER, 4=AUTUMN, 5=ALL SEASONSMparam.lat=37.54;   % LOCATION LATITUDEMparam.lon=122.07;  % LOCATION LONGITUDEMparam.bw=1;   % BANDWIDTHMparam.time=10; % SPECIFIC LOCAL MEAN TIMEassignin('base','Mparam',Mparam);Eparam.selc=3;Eparam.viewx='dx';Eparam.fafalse=1;Eparam.level=0;Eparam.graph=0;assignin('base','Eparam',Eparam);CData.grFreq=[];CData.grDis=[];CData.grEr=[];CData.grBTL=[];CData.sigemadB=[];assignin('base','CData',CData);% UIWAIT makes radarsim wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = radarsim_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 structurevarargout{1} = handles.output;function ans_Callback(hObject, eventdata, handles)% hObject    handle to ans (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 ans as text%        str2double(get(hObject,'String')) returns contents of ans as a doubleMparam=evalin('base','Mparam');ans = str2double(get(hObject, 'String'));if isnan(ans)    set(hObject, 'String', 0);    errordlg('必须输入一个数字','错误');end% Save the new ans valueMparam.ans = ans;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function ans_CreateFcn(hObject, eventdata, handles)% hObject    handle to ans (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');endfunction hscale_Callback(hObject, eventdata, handles)% hObject    handle to hscale (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 hscale as text%        str2double(get(hObject,'String')) returns contents of hscale as a doubleMparam=evalin('base','Mparam');hscale = str2double(get(hObject, 'String'));if isnan(hscale)    set(hObject, 'String', 0);    errordlg('必须输入一个数字','错误');end% Save the new hscale valueMparam.hscale = hscale;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function hscale_CreateFcn(hObject, eventdata, handles)% hObject    handle to hscale (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 during object creation, after setting all properties.function freq_CreateFcn(hObject, eventdata, handles)% hObject    handle to freq (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');endfunction epslon_Callback(hObject, eventdata, handles)% hObject    handle to epslon (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 epslon as text%        str2double(get(hObject,'String')) returns contents of epslon as a doubleMparam=evalin('base','Mparam');epslon = str2double(get(hObject, 'String'));if isnan(epslon)    set(hObject, 'String', 0);    errordlg('必须输入一个数字','错误');end% Save the new epslon valueMparam.epslon = epslon;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function epslon_CreateFcn(hObject, eventdata, handles)% hObject    handle to epslon (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');endfunction sigma_Callback(hObject, eventdata, handles)% hObject    handle to sigma (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 sigma as text%        str2double(get(hObject,'String')) returns contents of sigma as a doubleMparam=evalin('base','Mparam');sigma = str2double(get(hObject, 'String'));if isnan(sigma)    set(hObject, 'String', 0);    errordlg('必须输入一个数字','错误');end% Save the new sigma valueMparam.sigma = sigma;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function sigma_CreateFcn(hObject, eventdata, handles)% hObject    handle to sigma (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');endfunction dmin_Callback(hObject, eventdata, handles)% hObject    handle to dmin (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 dmin as text%        str2double(get(hObject,'String')) returns contents of dmin as a doubleMparam=evalin('base','Mparam');dmin = str2double(get(hObject, 'String'));if isnan(dmin)    set(hObject, 'String', 0);    errordlg('必须输入一个数字','错误');end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -