机械仿真基于matlab GUI 汽车悬架(钢板弹簧+减震器)设计含Matlab源码 1631期

Posted 紫极神光

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了机械仿真基于matlab GUI 汽车悬架(钢板弹簧+减震器)设计含Matlab源码 1631期相关的知识,希望对你有一定的参考价值。

一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【机械仿真】基于matlab GUI 汽车悬架(钢板弹簧+减震器)设计【含Matlab源码 1631期】

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

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

二、部分源代码

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

% Last Modified by GUIDE v2.5 07-Jan-2021 17:37:57

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

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

% Update handles structure
guidata(hObject, handles);

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


% --- Outputs from this function are returned to the command line.
function varargout = xuanjia_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
input = str2num(get(hObject,'String'))
if (isempty(input))    
    set(hObject,'String','0')
end
guidata(hObject, handles);


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



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
input = str2num(get(hObject,'String'))
if (isempty(input))    
    set(hObject,'String','0')
end
guidata(hObject, handles);


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

input = str2num(get(hObject,'String'))
if (isempty(input))    
    set(hObject,'String','0')
end
guidata(hObject, handles);

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

三、运行结果

四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 门云阁.MATLAB物理计算与可视化[M].清华大学出版社,2013.
[2]王增胜,朱煜钰,孔令云.曲柄摇杆机构运动分析与仿真[J].机械工程与自动化. 2014,(01)

以上是关于机械仿真基于matlab GUI 汽车悬架(钢板弹簧+减震器)设计含Matlab源码 1631期的主要内容,如果未能解决你的问题,请参考以下文章

基于Matlab的汽车主动悬架控制器设计与仿真

机械仿真基于matlab GUI凸轮设计与仿真含Matlab源码 153期

机械仿真基于matlab GUI曲柄摇杆机构运动仿真含Matlab源码 1608期

机械仿真基于matlab GUI直齿圆柱齿轮应力计算含Matlab源码 2077期

机械仿真基于matlab GUI直齿圆柱齿轮应力计算含Matlab源码 2077期

MATLAB | 机械臂可视化综合仿真平台