求MATLAB高人指点 我对MATLAB一点基础都没有 分别用三点高斯积分公式和辛普森公式计算
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/06 09:38:20
求MATLAB高人指点 我对MATLAB一点基础都没有 分别用三点高斯积分公式和辛普森公式计算
clear all
close all
clc
syms x
Q=[];
n=0:100;
k=2*n+3;% k是数列x(n)=2n+3;
for i=1:length(k)
Q=[Q;int(x^k(i),2,4)];
end
Q=eval(Q)
60
672
8160
104755.200000000
1397760
19172790.8571429
268431360
3817734144.00000
54975528960.0000
799644629550.545
11728123330560.0
173215367702370
2.57348549176759e+15
3.84307167844368e+16
5.76460752169206e+17
8.68082074006391e+18
1.31176846744470e+20
1.98836483488525e+21
3.02231454903382e+22
4.60543169376897e+23
7.03375022321199e+24
1.07646959937858e+26
1.65058671904717e+27
2.53530120045646e+28
3.90046338531763e+29
6.00960284552642e+30
9.27195867595505e+31
1.43235775407857e+33
2.21537999297486e+34
3.43026579557398e+35
5.31691198313966e+36
8.24926950111366e+37
1.28106302840824e+39
1.99113796415452e+40
3.09732572201814e+41
4.82178274562824e+42
7.51182996161032e+43
1.17107502991258e+45
1.82687704666363e+46
2.85171051186518e+47
4.45410022805609e+48
6.96082640291556e+49
1.08842012845589e+51
1.70277282318432e+52
2.66520963628850e+53
4.17360487725178e+54
6.53864764102779e+55
1.02483293638966e+57
1.60693804425899e+58
2.52068712824940e+59
3.95553980125290e+60
6.20945115970266e+61
9.75113811745900e+62
1.53181515154265e+64
2.40713809528131e+65
3.78385216381062e+66
5.94978133344014e+67
9.35830013124144e+68
1.47237255398199e+70
2.31717647839788e+71
3.64768426276828e+72
5.74365522010497e+73
9.04625697166533e+74
1.42513340599774e+76
2.24566476096613e+77
3.53943580235856e+78
5.57981644136526e+79
8.79831925826870e+80
1.38762063730409e+82
2.18892269546561e+83
3.45363358617907e+84
5.45011765928533e+85
8.60234787303415e+86
1.35802398422299e+88
2.14424839614156e+89
3.38624162299759e+90
5.34852523017055e+91
8.44931580664917e+92
1.33499189745057e+94
2.10961682560090e+95
3.33422366582776e+96
5.27048367417593e+97
8.33238371345909e+98
1.31749690716341e+100
2.08348348109563e+101
3.29525663216964e+102
5.21249685452289e+103
8.24628715861599e+104
1.30474587931880e+106
2.06465282002095e+107
3.26753750646794e+108
5.17184431131270e+109
8.18691950556734e+110
1.29611862488140e+112
2.05218782272888e+113
3.24964999557893e+114
5.14638448279438e+115
8.15104128183999e+116
1.29112493904345e+118
2.04534643808864e+119
3.24047043524632e+120
再问: 非常感谢, 这是辛普森公式? 三点高斯积分公式怎么编程?
再答: 能写出积分公式么?我不大清楚什么是高斯公式。。。给出公式我可以试试。。。
再问: 多谢
再答: 这个我貌似不懂哎。。。不好意思啦。。。
close all
clc
syms x
Q=[];
n=0:100;
k=2*n+3;% k是数列x(n)=2n+3;
for i=1:length(k)
Q=[Q;int(x^k(i),2,4)];
end
Q=eval(Q)
60
672
8160
104755.200000000
1397760
19172790.8571429
268431360
3817734144.00000
54975528960.0000
799644629550.545
11728123330560.0
173215367702370
2.57348549176759e+15
3.84307167844368e+16
5.76460752169206e+17
8.68082074006391e+18
1.31176846744470e+20
1.98836483488525e+21
3.02231454903382e+22
4.60543169376897e+23
7.03375022321199e+24
1.07646959937858e+26
1.65058671904717e+27
2.53530120045646e+28
3.90046338531763e+29
6.00960284552642e+30
9.27195867595505e+31
1.43235775407857e+33
2.21537999297486e+34
3.43026579557398e+35
5.31691198313966e+36
8.24926950111366e+37
1.28106302840824e+39
1.99113796415452e+40
3.09732572201814e+41
4.82178274562824e+42
7.51182996161032e+43
1.17107502991258e+45
1.82687704666363e+46
2.85171051186518e+47
4.45410022805609e+48
6.96082640291556e+49
1.08842012845589e+51
1.70277282318432e+52
2.66520963628850e+53
4.17360487725178e+54
6.53864764102779e+55
1.02483293638966e+57
1.60693804425899e+58
2.52068712824940e+59
3.95553980125290e+60
6.20945115970266e+61
9.75113811745900e+62
1.53181515154265e+64
2.40713809528131e+65
3.78385216381062e+66
5.94978133344014e+67
9.35830013124144e+68
1.47237255398199e+70
2.31717647839788e+71
3.64768426276828e+72
5.74365522010497e+73
9.04625697166533e+74
1.42513340599774e+76
2.24566476096613e+77
3.53943580235856e+78
5.57981644136526e+79
8.79831925826870e+80
1.38762063730409e+82
2.18892269546561e+83
3.45363358617907e+84
5.45011765928533e+85
8.60234787303415e+86
1.35802398422299e+88
2.14424839614156e+89
3.38624162299759e+90
5.34852523017055e+91
8.44931580664917e+92
1.33499189745057e+94
2.10961682560090e+95
3.33422366582776e+96
5.27048367417593e+97
8.33238371345909e+98
1.31749690716341e+100
2.08348348109563e+101
3.29525663216964e+102
5.21249685452289e+103
8.24628715861599e+104
1.30474587931880e+106
2.06465282002095e+107
3.26753750646794e+108
5.17184431131270e+109
8.18691950556734e+110
1.29611862488140e+112
2.05218782272888e+113
3.24964999557893e+114
5.14638448279438e+115
8.15104128183999e+116
1.29112493904345e+118
2.04534643808864e+119
3.24047043524632e+120
再问: 非常感谢, 这是辛普森公式? 三点高斯积分公式怎么编程?
再答: 能写出积分公式么?我不大清楚什么是高斯公式。。。给出公式我可以试试。。。
再问: 多谢
再答: 这个我貌似不懂哎。。。不好意思啦。。。
求MATLAB高人指点 我对MATLAB一点基础都没有 分别用三点高斯积分公式和辛普森公式计算
matlab...分别用矩型、梯形、Simpson公式计算积分的近似值
Matlab问题!用辛普森公式求数值积分..
matlab中的公式计算
matlab对公式画图,
用matlab(复化梯形公式)计算积分
matlab计算下面的公式.
MATLAB复化梯形公式求数值积分 ,并分析等分数n对积分结果的影响.
求问matlab计算的几个公式以及方法.
求编一个MATLAB的代码,要求计算几个公式
用MATLAB程序编写复化梯形公式和复化simpsion公式求解积分
如何用matlab输入这个公式和计算数值