tianlang004 发表于 2007-5-29 13:25

matlab程序求助

程序每次运行都提示
??? Input argument "V" is undefined.
Error in ==> F_Ft at 28
    F_t         = (0.613*V^2/1000) * diag(A_t) * Cp_tr;   % units in example are kN
请问该怎么改?谢谢!
源程序如下

function = F_Ft(Cp_tr,V)
global   flnTapstapsNtapsNpoints
% This function calculates the wind load matrix, F_t (Ntaps x Npoints), for dynamic MDOF system
%%%%%%%%%%%%%%%%% Pressure tap information : flnTaps, Page 2, %%%%%%%%%%%%%%%%%%%%
% Load flnTaps and check for errors
clear fid; fid=fopen(flnTaps);
if fid == -1
    errordlg('Unable to open ''flnTaps'' - Page 2')
    error   ('Unable to open ''flnTaps'' - Page 2')
end
fclose(fid); clear fid;
=[]; load (flnTaps)   
if isempty(taps)==1
    errordlg('Variable ''taps'' not defined. See flnTaps on Page Two')
    error   ('Variable ''taps'' not defined. See flnTaps on Page Two')
end
if size(taps,1) ~= Ntaps | size(taps,2) ~= 5
    errordlg('Variable ''taps'' not properly sized. (Ntaps x 5)')
    error   ('Variable ''taps'' not properly sized. (Ntaps x 5)')
end
A_t = taps(:,5);            % Tributary areas in last column of 'taps'
%%%%%%%%%%%%%%%% Calculate the wind load matrix, F_t (Ntaps x Npoints) %%%%%%%%%%%%%%%%%%%%%
F_t = zeros(Ntaps,Npoints);   % Initialize the wind forces array
% Change the following lines to accomodate the proper F_t
% 1. Cp_tr contains pressure coefficients
    F_t         = (0.613*V^2/1000) * diag(A_t) * Cp_tr;   % units in example are kN
                  'NOTE: 1/2 rho V^2 Cp(t) USED!!! F_t in kN (F_Ft.m)'
% 2. Cp_tr contains pressures
%    F_t         = diag(A_t) * Cp_tr;
%                  'NOTE: Cp(t) * A USED!!! (F_Ft.m)'
% 3. Cp_tr contains forces
%    F_t         =Cp_tr;
%                   'NOTE: Cp(t) USED!!! (F_Ft.m)'

eight 发表于 2007-5-29 13:28

原帖由 tianlang004 于 2007-5-29 13:25 发表 http://www.chinavib.com/forum/images/common/back.gif
程序每次运行都提示
??? Input argument "V" is undefined.
Error in ==> F_Ft at 28
    F_t         = (0.613*V^2/1000) * diag(A_t) * Cp_tr;   % units in example are kN
请问该怎么改?谢谢!
源程 ...


建议先自己动手看一下 置顶贴:聚宝盆,请认真阅读
页: [1]
查看完整版本: matlab程序求助