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=756)

xiaoxie 2007-08-21 12:52

【求助】用MATLAB求方程组解
 
求方程组的解
我编了一下程序
先建立方程函数文件,并保存为myfun.m:
function F=myfun(x)
ne=1.55737476478271;
no=1.54812911343683;
a=0/180*pi;
t=0;
F=[x(1)-no*ne/(no^2*sin(x(2))^2+ne^2*cos(x(2))^2)^(1/2);sin(a)-x(1)*sin(pi/2-t-x(2))]
然后调用优化程序
x0=[1,1];
options=optimset('Display','iter');
[x,fval] = fsolve(@myfun,x0,options)
可以求出解,现在我想画出t与X(1)的关系,也就要改变t值求相应的x(1),不知道这个循环程序应该怎么编,谢谢

changxiaoli 2009-06-08 20:27

【求助】谁能帮修改一下这个交通流MATLAB循环程序。
 
1 个附件
我毕业论文所需,毕业在急,请各位仁兄帮帮忙。谢谢大家了。


所有时间均为北京时间。现在的时间是 12:57

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