函数为 VO=-VI×[(R*F/2*3.14×j×R*C+F)] 用maitlab编程拟合曲线 程序如下:VI=[1,2,3,4,5,6,7];C=[2.31318,14.1402,17.9081,28.71,30.7746,86.4247,156.2];R=[19.633,4.0983,3.282,1.7222,1.1954,0.70498,0.382];F=[0.05,0.1,0.5,1,5,10,20,25,30,35,5
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/09 06:08:28
函数为 VO=-VI×[(R*F/2*3.14×j×R*C+F)] 用maitlab编程拟合曲线 程序如下:VI=[1,2,3,4,5,6,7];C=[2.31318,14.1402,17.9081,28.71,30.7746,86.4247,156.2];R=[19.633,4.0983,3.282,1.7222,1.1954,0.70498,0.382];F=[0.05,0.1,0.5,1,5,10,20,25,30,35,5
函数为 VO=-VI×[(R*F/2*3.14×j×R*C+F)] 用maitlab编程拟合曲线 程序如下:
VI=[1,2,3,4,5,6,7];
C=[2.31318,14.1402,17.9081,28.71,30.7746,86.4247,156.2];
R=[19.633,4.0983,3.282,1.7222,1.1954,0.70498,0.382];
F=[0.05,0.1,0.5,1,5,10,20,25,30,35,50];
Vo=-VI*[R*F/(2*Pi*j*R*C+F)]
P2=Polyfit(F,Vo,2);
Vo2=ployval(p2,F);
为什不对?应该怎样写才能拟合出曲线来,
拟合的曲线是幅频曲线,输出电压VO和频率F.
函数为 VO=-VI×[(R*F/2*3.14×j×R*C+F)] 用maitlab编程拟合曲线 程序如下:VI=[1,2,3,4,5,6,7];C=[2.31318,14.1402,17.9081,28.71,30.7746,86.4247,156.2];R=[19.633,4.0983,3.282,1.7222,1.1954,0.70498,0.382];F=[0.05,0.1,0.5,1,5,10,20,25,30,35,5
矩阵乘的有问题
如果就是各个对应项相乘的话
最简单就是加个循环,把你原来那句矩阵相乘标注掉,不过不知道你那里面那个j是哪来的,前面补上j的定义就可以了
for ii=1:length(VI)
VO[ii]=-VI[ii]*(R[ii]*F[ii]/(2*pi*j*R[ii]*C[ii]+F[ii]))
end
%Vo=-VI*[R*F/(2*Pi*j*R*C+F)]