声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

12
返回列表 发新帖
楼主: zhly

[应用数学] 带求和式的指数方程怎么解?

[复制链接]
发表于 2009-3-15 13:16 | 显示全部楼层

回复 15楼 zhly 的帖子

我目前无matlab试, 但由网路看帮助文档, 如下
^
Matrix power. X^p is X to the power p, if p is a scalar. If p is an integer, the power is computed by repeated squaring. If the integer is negative, X is inverted first. For other values of p, the calculation involves eigenvalues and eigenvectors, such that if [V,D] = eig(X), then X^p = V*D.^p/V.
  If x is a scalar and P is a matrix, x^P is x raised to the matrix power P using eigenvalues and eigenvectors. X^P, where X and P are both matrices, is an error.

.^
Array power. A.^B is the matrix with elements A(i,j) to the B(i,j) power. A and B must have the same size, unless one of them is a scalar.
a不是方阵, 应该会报错才是, 爲何不报错目前不得而知
但可以确定的是连加是a'.^(D-1)

还有LZ这个较偏编程问题, 建议院长或版主移至MATLAB区块
回复 支持 反对
分享到:

使用道具 举报

发表于 2009-3-15 21:14 | 显示全部楼层
通用的解法想到一个,思路是这样的。指数函数a^x的泰勒展开具有很好的收敛性质,取前几项就有很好的精度。这样导致一个常系数多项式求根的问题,而这个问题是有现成算法的。
发表于 2009-3-16 11:08 | 显示全部楼层

刚刚试了下, 会报错
??? Error using ==> ^
Matrix must be square.
 楼主| 发表于 2009-3-17 17:06 | 显示全部楼层

回复18楼

我按下面的程序运行,没有报错
function F=fun(D)
a=[1/3,1/3,1/3];
d=[0.12,0.03,0.45];
n=3;
F=[abs(d)*a'.^(D-1)-1];

命令行:clear all;D0=1; fsolve(@F,D0);
结果显示
Optimization terminated: first-order optimality is less than options.TolFun.

ans 0.53503
 楼主| 发表于 2009-3-17 17:18 | 显示全部楼层
原帖由 side 于 2009-3-15 21:14 发表
通用的解法想到一个,思路是这样的。指数函数a^x的泰勒展开具有很好的收敛性质,取前几项就有很好的精度。这样导致一个常系数多项式求根的问题,而这个问题是有现成算法的。

谢谢你的帮忙
泰勒展开的内容也忘了,还不太懂你的思路,要学习一下。
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-5-17 00:46 , Processed in 0.053402 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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