微信:HuangL1121
QQ号:1224848052
团队:MATLAB代做|MATLAB专业代做|硕士博士代写
地址:北京市-朝阳区-双柳北街18号院
当前位置:首页 > 图像语音 > 基于MATLAB的最短路径搜索算法仿真
项目案例
基于MATLAB的最短路径搜索算法仿真
基于MATLAB的最短路径搜索算法仿真
产品说明:function varargout = tops_GUI(varargin)
% TOPS_GUI M-file for tops_GUI.fig
%      TOPS_GUI, by itself, creates a new TOPS_GUI or raises the existing
%      singleton*.
%
%      H = TOPS_GUI returns the handle to a new TOPS_GUI or the handle to
%      the existing singleton*.
%
%      TOPS_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in TOPS_GUI.M with the given input arguments.
%
%      TOPS_GUI('Property','Value',...) creates a new TOPS_GUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before tops_GUI_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to tops_GUI_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 tops_GUI

% Last Modified by GUIDE v2.5 01-Mar-2011 20:35:24

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @tops_GUI_OpeningFcn, ...
                   'gui_OutputFcn',  @tops_GUI_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 tops_GUI is made visible.
function tops_GUI_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 tops_GUI (see VARARGIN)

% Choose default command line output for tops_GUI
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes tops_GUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = tops_GUI_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 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


% --- 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


% --- 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


% --- 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)
global R;
global Num;
global x0;
global y0;
global img;
R1=get(handles.edit2,'string')
if isempty(str2num(R1))
        warndlg('Input is wrong,please input numeric type')
else
        R = str2num(R1);
end
Num1=get(handles.edit3,'string')
if isempty(str2num(Num1))
        warndlg('Input is wrong,please input numeric type')
else
        Num = str2num(Num1);
end
cla reset
for i = 1:Num
   x0(i,1) = abs(round(50*rand(1))/50);
   x0(i,2) = i;
   y0(i,1) = abs(round(50*rand(1))/50);
   y0(i,2) = i;
end
t = pi/180:pi/180:2*pi;
for i = 1 : Num
    x(:,i)=R*cos(t)+x0(i,1);
    y(:,i)=R*sin(t)+y0(i,1);
    plot(x,y,'g');hold on;   
    fill(x,y,'g');%用红色填充
%     set(tt,'EdgeAlpha',0);
end
p0=[0 0];
p1=[1 0];
p2=[1 1];
p3=[0 1];
p4=[0 0];
x1=[p0(1) p1(1) p2(1) p3(1) p4(1)];
y1=[p0(2) p1(2) p2(2) p3(2) p4(2)];
plot(x1,y1,'r','LineWidth',2);hold on;
axis([-0.1,1.1,-0.1,1.1]);
axis square;
img=getframe(handles.axes1);
 



% --- Executes on button press in pushbutton2.
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)
clear;
clc;
close;


% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global R;
global Num;
global x0;
global y0;
global img;
global flag1;
global flag2;


flag1 = 0;
flag2 = 0;

G = func_cut_different_area(img.cdata);
%上下搜索
flag1 = func_find_patch(G,1,Num,x0,y0,R);
%左右搜索
flag2 = func_find_patch(G,0,Num,x0,y0,R);

if flag1 == 1 & flag2 == 1
    cla reset
   warndlg('不存在Percolation'); 
end

----------------------------------------------------------------------------------------------------------

联系:Highspeedlogic
QQ :1224848052
微信:HuangL1121
邮箱:1224848052@qq.com
官方网站:http://www.mat7lab.com/

资源网站:http://www.hslogic.com/

----------------------------------------------------------------------------------------------------------

       本团队从事MATLAB算法仿真工作10年,从事FPGA系统开发工作8多年。主要立志于解决各种算法仿真、建模、通信、图像处理等各专业问题,为企事业提供各类项目解决方案的MATLAB/SIMULINK仿真技术服务,为高校学术研究提供算法的MATLAB仿真技术支持,为个人客户提供各种算法仿真方案。团队成立10多年以来,有能力有实力承接各类前沿课题,新技术课题,算法创新类课题,高速算法的MATLAB仿真及FPGA硬件实现。

      目前,在图像处理,通信信号处理,智能控制,电力电网优化,神经网络,网络分析,光学,物理以及有限元等多个领域具有较强的技术实力,可以承接相关算法的MATLAB仿真和FPGA硬件实现。本团队的主要业务主要包括:matlab代做,matlab专业代做,matlab淘宝代做, matlab硕士代做,matlab博士代做,matlab SCI代写,MATLA期刊代写, matlab论文代写,matlab coursework代做,matlab assignment代做, fpga代做,fpga专业代做,simulink代做,simulink专业代做, matlab有偿代做,matlab留学生作业代做,matlab留学生代做,matlab项目代做,FPGA项目代做, matlab博士论文代写,matlab硕士论文代写,matlab毕业论文代写,matlab毕业设计,matlab算法代做,matlab靠谱代做,matlab博士课题代做,matlab硕士课题代做,matlab毕业课题代做



上一篇:Vande Waals力

版权所有: MATLAB代做|MATLAB专业代做|硕士博士代写 Copyright © 2018 All rights reserved.
微信:HuangL1121 QQ:1224848052
地址:北京市-朝阳区-双柳北街18号院

扫一扫,关注我们