MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   matlab程序优化问题 (https://www.labfans.com/bbs/showthread.php?t=10654)

deepblue 2010-01-24 10:58

matlab程序优化问题
 
我编写了一个mablab小程序,本想使其中的p,q,x,y均是m * n矩阵,m和n均是大于1的值,且Q为常数。然而,程序中xPrime和yPrime却均不是应有维数。希望哪位仁兄指教一下。

function GongE= fi(p,q,x,y,Q)
theta = q * pi / Q;
scale = p;
a = 2;
w = 0.5;
sx = 1;
sy = 1;

xPrime= a^(-p)*(x*cos(theta)+y*sin(theta));
yPrime= a^(-p)*(-x*sin(theta)+y*cos(theta));

t = (1/(2*pi*sx*sy))*exp(-.5*((xPrime/sx)^2+(yPrime/sy)^2))*exp(2*pi*w*xPrime*i);

GongE = a^(-p)*t;
end

acwyc 2010-05-01 22:34

回复: matlab程序优化问题
 
兄弟!!不会啊 //////


所有时间均为北京时间。现在的时间是 02:54

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.