当前位置:网站首页>[mathematical modeling] spanning tree based on Matlab GUI random nodes [including Matlab source code 1919]

[mathematical modeling] spanning tree based on Matlab GUI random nodes [including Matlab source code 1919]

2022-06-26 21:52:00 Poseidon light

One 、 How to get the code

How to get the code 1:
The complete code has been uploaded to my resources :【 mathematical modeling 】 be based on matlab GUI Spanning tree of random nodes 【 contain Matlab Source code 1919 period 】

How to get the code 2:
By subscribing to Ziji Shenguang blog Paid column , With proof of payment , Private Blogger , This code is available .

remarks :
Subscribe to Ziji Shenguang blog Paid column , Free access to 1 Copy code ( The period of validity From the Subscription Date , Valid for three days );

Two 、 Partial source code

function varargout = main(varargin)
% MAIN M-file for main.fig
%      MAIN, by itself, creates a new MAIN or raises the existing
%      singleton*.
%
%      H = MAIN returns the handle to a new MAIN or the handle to
%      the existing singleton*.
%
%      MAIN('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in MAIN.M with the given input arguments.
%
%      MAIN('Property','Value',...) creates a new MAIN or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before main_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to main_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 main

% Last Modified by GUIDE v2.5 26-Jun-2022 10:35:54

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @main_OpeningFcn, ...
                   'gui_OutputFcn',  @main_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 main is made visible.
function main_OpeningFcn(hObject, eventdata, handles, varargin)
global hds
global hpg hpt hps hpnn % graph handles, tree handles, start point handle, nodes numbers
global rr % to meorize r - nodes positions

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

% Update handles structure
guidata(hObject, handles);

hds=handles;

set(hds.figure1,'MenuBar','figure','Toolbar','figure');

set(hds.axes1,'NextPlot','Add');
axis(hds.axes1,'equal');

3、 ... and 、 Running results

 Insert picture description here

Four 、matlab Edition and references

1 matlab edition
2014a

2 reference
[1] Li Xin .MATLAB mathematical modeling [M]. tsinghua university press .2017
[2] Wang Jian , Zhao Guosheng .MATLAB Mathematical modeling and simulation [M]. tsinghua university press .2016
[3] Yu Shengwei .MATLAB Mathematical modeling classic case practice [M]. tsinghua university press .2015

原网站

版权声明
本文为[Poseidon light]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206262148164747.html