MATLAB未定义变量example,"小虫求助“ 未定义函数或变量 'Beam_InputData547'。

小虫刚学习MATLAB,现正在学习《Matlab有限元结构动力学分析与工程应用》,在5.4.3瞬态问题分析。例5.7中按照书本附带的源程序运行提示

未定义函数或变量 'Beam_InputData547'。

出错 EX547 (line 28)

Beam_InputData547;                     % import the input data for the information of

代码开头部分如下:

%-------------------------------------------------------------------------%

% Example 5.4.7

%   To solve transient response of a 2-d frame structure.

%   The solution methods are: 1) central difference scheme. 3) Houbolt integration scheme.

%   4) Wilson ?? integration scheme. 5) Newmark integration scheme

%   nodal dof: {u1  v1  w1  x1  y1  z1  u2  v2  w2  x2  y2  z2}

% Problem description

%   Find the response of a frame structure which is made of three beams of lengths of 4 m,

%   3 m and 4 m, respectively. All beams have cross- section of 0.10 m height by 0.05 m

%   width. The elastic modulus is 2.10x10^11 Pa. The frame is subjected to an impulse load

%   of amplitude 500 N in the middle of the top beam. One end of the each vertical beam is

%   fixed. (see Fig. 5-9 for the element discretization)

% Variable descriptions

%   k, m - element stiffness matrix and mass matrix

%   kk, mm - system stiffness matrix and mass matrix

%   ff - system force vector

%   index - a vector containing system dofs associated with each element

%   bcdof - a vector containing dofs associated with boundary conditions

%   bcval - a vector containing boundary condition values associated with the dofs in 'bcdof'

%   dsp - displacement matrix

%   vel - velocity matrix

%   acc - acceleartion matrix

%--------------------------------------------------------------------------

%  (0) input control data

%--------------------------------------------------------------------------

clear; clc;

Beam_InputData547;                     % import the input data for the information of

% nodes, elements, loads, constraints and materials

Opt_beam=1;                                        % option for type of the beam

% =1 Euler Bernoulli beam

% =2 Timoshenko beam

Opt_mass=2;                                            % option for mass matrix

% =1 consistent mass matrix

% =2 lumped mass matrix

Opt_section=1;                                    % option for type of cross-section

% = 1 rectangular cross-section

% = 2 circular cross-section

TypeMethod=1;                            % option for selecting the solution method

% = 1 central difference scheme

% = 3 Houbolt integration scheme

% = 4 Wilson   integration scheme

% = 5 Newmark integration scheme

Typeload=1;                                    % option for selecting the load type

% = 1 impulse load

% = 2 step load

% = 3 Harmonic load

dt=0.00001;                                                    % time step size

ti=0;                                                            % initial time

tf=0.200;                                                          % final time

nt=fix((tf-ti)/dt);                                           % number of time steps

tt=ti:dt:ti+nt*dt;                                     % generate time samples vector

ac=0.00002; bc=0.00008;                       % Parameters for proportional damping

al=0;                            % angle between the reference coordinate system and

% the local coordinate system for the space element

%--------------------------------------------------------------------------

%  (1) initialization of matrices and vectors to zero

%--------------------------------------------------------------------------

k=zeros(No_nel*No_dof,No_nel*No_dof);                   % element stiffness matrix

m=zeros(No_nel*No_dof,No_nel*No_dof);                     % element mass matrix

kk=zeros(Sys_dof,Sys_dof);                   % initialization of system stiffness matrix

mm=zeros(Sys_dof,Sys_dof);                     % initialization of system mass matrix

ff=zeros(Sys_dof,1);                            % initialization of system force vector

bcdof=zeros(Sys_dof,1);                               % initializing the vector bcdof

bcval=zeros(Sys_dof,1);                                % initializing the vector bcval

index=zeros(No_nel*No_dof,1);                        % initialization of index vector

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

未定义变量是否可以理解为Beam_InputData547=???

或Beam=input(data547),但在源文件中并未找到相关信息。

另外本章源程序开始第一句均为”Beam_InputData      ”

均出现如上问题,恳请大神赐教!!

现将第五章相关内容及程序在附上。。。t-9332181-1

错误提示.png

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值