matlab编程高手请进!!

求不定方程a^6+b^6+c^6+d^6+e^6+f^6=6*t^6的互不相等的整数解,且a<b<c<d<e<f,5<=t<=55程序如下functionksymsint... 求不定方程a^6+b^6+c^6+d^6+e^6+f^6=6*t^6的互不相等的整数解,且a<b<c<d<e<f,5<=t<=55
程序如下

function k
syms int64 t a b c d e f
for t=5:55;
for a=1:t;
for b=a+1:round(1.04*t);
for c=b+1:round(1.07*t);
for d=c+1:round(1.13*t);
for e=d+1:round(1.21*t);
f=round((6*t^6-a^6-b^6-c^6-d^6-e^6)^(1/6));
if f<e
break
elseif int64(f^6)==int64(6*t^6-a^6-b^6-c^6-d^6-e^6)
disp(t)
disp(a)
disp(b)
disp(c)
disp(d)
disp(e)
disp(f)
end
end
end
end
end
end
//
程序中for循环太多影响运算速度,怎样去掉for循环向量化?能否给出最优算法?不胜感激!
展开
 我来答
手机用户22126
2011-06-25 · TA获得超过318个赞
知道小有建树答主
回答量:455
采纳率:0%
帮助的人:90.6万
展开全部
用cftool工具。
>>cftool
得到
g=2
Linear model Poly2:
f(x) = p1*x^2 + p2*x + p3
Coefficients (with 95% confidence bounds):
p1 = 8.959e-005 (-6.018e-007, 0.0001798)
p2 = 0.003271 (-0.004365, 0.01091)
p3 = 1.024 (0.9125, 1.136)

Goodness of fit:
SSE: 0.005153
R-square: 0.9922
Adjusted R-square: 0.9871
RMSE: 0.04145
g=4
Linear model Poly4:
f(x) = p1*x^4 + p2*x^3 + p3*x^2 + p4*x + p5
Coefficients (with 95% confidence bounds):
p1 = 3.78e-008 (-3.783e-008, 1.134e-007)
p2 = -3.332e-006 (-1.496e-005, 8.293e-006)
p3 = 6.594e-005 (-0.0004892, 0.0006211)
p4 = 0.007842 (-0.0009549, 0.01664)
p5 = 0.9995 (0.9621, 1.037)

Goodness of fit:
SSE: 8.94e-006
R-square: 1
Adjusted R-square: 0.9999
RMSE: 0.00299

General model Exp1:
f(x) = a*exp(b*x)
Coefficients (with 95% confidence bounds):
a = 0.9802 (0.8973, 1.063)
b = 0.007864 (0.006483, 0.009244)

Goodness of fit:
SSE: 0.009766
R-square: 0.9853
Adjusted R-square: 0.9816
RMSE: 0.04941
pingtong11
2011-06-24 · TA获得超过339个赞
知道答主
回答量:622
采纳率:0%
帮助的人:337万
展开全部
用cftool工具。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
zxcvbnmUH
2011-06-26
知道答主
回答量:11
采纳率:0%
帮助的人:0
展开全部
Linear model Poly2:
f(x) = p1*x^2 + p2*x + p3
Coefficients (with 95% confidence bounds):
p1 = 8.959e-005 (-6.018e-007, 0.0001798)
p2 = 0.003271 (-0.004365, 0.01091)
p3 = 1.024 (0.9125, 1.136)

Goodness of fit:
SSE: 0.005153
R-square: 0.9922
Adjusted R-square: 0.9871
RMSE: 0.04145
g=4
Linear model Poly4:
f(x) = p1*x^4 + p2*x^3 + p3*x^2 + p4*x + p5
Coefficients (with 95% confidence bounds):
p1 = 3.78e-008 (-3.783e-008, 1.134e-007)
p2 = -3.332e-006 (-1.496e-005, 8.293e-006)
p3 = 6.594e-005 (-0.0004892, 0.0006211)
p4 = 0.007842 (-0.0009549, 0.01664)
p5 = 0.9995 (0.9621, 1.037)

Goodness of fit:
SSE: 8.94e-006
R-square: 1
Adjusted R-square: 0.9999
RMSE: 0.00299

General model Exp1:
f(x) = a*exp(b*x)
Coefficients (with 95% confidence bounds):
a = 0.9802 (0.8973, 1.063)
b = 0.007864 (0.006483, 0.009244)

Goodness of fit:
SSE: 0.009766
R-square: 0.9853
Adjusted R-square: 0.9816
RMSE: 0.04941
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式