呵呵,数学好也没用啊,需要编程基础呀。不过你这个才1-7求和,实在不行只好辛苦点,自己手算了
clear;%清理matlab下的变量
clc;%清理一下command wondow
C = 0.0018;S=0.6;VC = 0.62; A = 0.7;a2 = 2.4869;%定义一些参数
b2 = -0.0014;c2= -54.9472;%还是参数
T=[2040,1560,1620,1140,120,300,60];%定义一个数组,包含T的所有值
U=[7.5,8.5,9.5,10.5,11.5,12.5,13.5];%定义一个数组,包含U的所有值
temp=T.*exp(a2+b2*VC^2+c2./(A.*U));%求和内部的公式,注意是中间有点乘(.*)
Q=10*C*(1-S)*sum(temp)%sum就是求和的意思
答案:0.18565544111342377475715181844862
程序如下:
clear all;
clc;
a2=2.4869; b2=-0.0014; c2=-54.9472;
C=0.0018; S=0.6; VC=0.62; A=0.7;
T=[2040, 1560, 1620, 1140, 120, 300, 60];
U=[7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5];
sum=0;
for j=1:7
sum = sum + T(j)*exp(a2+b2*VC^2+c2/(A*U(j)));
end
Qfaf = 10*C*(1-S)*sum;
display(vpa(Qfaf));