声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1448|回复: 1

[编程技巧] matlab程序求助

[复制链接]
发表于 2007-5-29 13:25 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
程序每次运行都提示
??? 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_t] = F_Ft(Cp_tr,V)
global   flnTaps  taps  Ntaps  Npoints
% This function calculates the wind load matrix, F_t (Ntaps x Npoints), for dynamic MDOF system
%%%%%%%%%%%%%%%%% Pressure tap information : flnTaps, Page 2, [Ntaps X 5] %%%%%%%%%%%%%%%%%%%%
% 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;
[taps]=[]; 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)'
回复
分享到:

使用道具 举报

发表于 2007-5-29 13:28 | 显示全部楼层
原帖由 tianlang004 于 2007-5-29 13:25 发表
程序每次运行都提示
??? 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
请问该怎么改?谢谢!
源程 ...



建议先自己动手看一下 置顶贴:聚宝盆,请认真阅读
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-12-4 10:48 , Processed in 0.060701 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表