查看单个帖子
旧 2012-03-18, 01:38   #1
kevinzyk
初级会员
 
注册日期: 2010-02-27
帖子: 1
声望力: 0
kevinzyk 正向着好的方向发展
默认 matlab解非线性方程 ??? Undefined function or method 'uminus' for input argum

clear all
clc
close all
NA=1.4;
n=1.516;
A=1;
alpha=asin(NA/n);
phy1=0*pi;
r1=0.7*0;
theta1=asin(r1.*sin(alpha));
v=0;
f0=@(u,theta)sqrt(cos(theta)).*sin(theta).*(1+cos(theta)).*besselj(0,v*sin(theta)./sin(alpha)).*exp(1i*u*cos(theta)./(sin(alpha)^2));
f1=@(u,theta)exp(1i*cos(phy1)).*sqrt(cos(theta)).*sin(theta).*(1+cos(theta)).*besselj(0,v*sin(theta)./sin(alpha)).*exp(1i*u*cos(theta)./(sin(alpha)^2));
y=@(u)-1*abs(quadv(@(theta)f0(u,theta),0,theta1)+quadv(@(theta)f1(u,theta),theta1,alpha)).^2;
f=fsolve(y-0.5*0.760014332787662,-3)
解非线性方程时,运行老是出错,有人知道怎么回事吗?
kevinzyk 当前离线   回复时引用此帖