运动学基于matlab模拟布朗运动(可输入温度)含Matlab源码 1610期

Posted 紫极神光

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了运动学基于matlab模拟布朗运动(可输入温度)含Matlab源码 1610期相关的知识,希望对你有一定的参考价值。

一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【运动学】基于matlab模拟布朗运动(可输入温度)【含Matlab源码 1610期】

获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。

备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);

二、部分源代码

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

% Last Modified by GUIDE v2.5 13-Sep-2021  13:42:21

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @bulang_OpeningFcn, ...
                   'gui_OutputFcn',  @bulang_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin1)
    gui_State.gui_Callback = str2func(varargin1);
end

if nargout
    [varargout1:nargout] = gui_mainfcn(gui_State, varargin:);
else
    gui_mainfcn(gui_State, varargin:);
end
% End initialization code - DO NOT EDIT


% --- Executes just before bulang is made visible.
function bulang_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 bulang (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

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


% --- Outputs from this function are returned to the command line.
function varargout = bulang_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
varargout1 = 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
global k;


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


% --- 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)
axes(handles.axes1);
global k;
n=50;

set(h,'EraseMode','Xor','MarkerSize',24);
if k>=0;
    for i=linspace(1,10,10000)
        drawnow
        x=x+k/10000.*randn(n,1);
        y=y+k/10000.*randn(n,1);
        set(h,'xdata',x,'ydata',y);
    end    
    else
        input('Error');
end   



% --------------------------------------------------------------------
function Quit_Callback(hObject, eventdata, handles)
% hObject    handle to Quit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
close

三、运行结果

四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 门云阁.MATLAB物理计算与可视化[M].清华大学出版社,2013.

以上是关于运动学基于matlab模拟布朗运动(可输入温度)含Matlab源码 1610期的主要内容,如果未能解决你的问题,请参考以下文章

运动学基于matlab GUI模拟小球自由落体含Matlab源码 1630期

图像边缘检测基于matlab模拟退火算法图像边缘检测含Matlab源码 2398期

RWM基于matlab路由无线传感器网络模拟随机路点运动模型含Matlab源码 1565期

运动学基于matlab GUI地球自转模拟含Matlab源码 1115期

运动学基于matlab GUI模拟投篮系统(角度+力度可调)含Matlab源码 1114期

运动检测基于matlab最大互信息运动目标检测含Matlab源码 1607期