全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
2350 1
2006-10-26

我想请教大家一个有关MATLAB的问题:

我想解出C11,C12,C21,C22,用以下方法

>> eq1='c11*c11+c12*c12=0.000449';
>> eq2='c11*c21+c12*c22=0.000181';
>> eq3='c21*c21+c22*c22=0.000753';
>> eq4='-411.693*c11+62.1194*c21=0';
>> solve(eq1,eq2,eq3,eq4)

得出的结果却是

ans =

c11: [4x1 sym]
c12: [4x1 sym]
c21: [4x1 sym]
c22: [4x1 sym]

好象不行啊!怎么才能解出C11,C12,C21,C22.

不胜感激!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2006-10-27 11:36:00

1.fsolve : solves systems of nonlinear equations of several variables.

2. Step1:write an m-file

function f = weilai(x)

f(1) = x(1)*x(1)+x(2)*x(2)-0.000449;

f(2) = x(1)*x(3)+x(2)*x(4)-0.000181;

f(3) = x(3)*x(3)+x(4)*x(4)-0.000753;

f(4) = -411.693*x(1)+62.1194*x(3);

% save as weilai.m in a directory on the MATLAB path.

Step2: at the MATLAB command prompt. Enter

x0=[1,1,1,1]; %make a start guess at the solution

x=fsolve('weilai',x0)

x =

0.0041 0.0208 0.0273 0.0033

3.答案会随起始点不同而不同,请设定为你认为最适当的值.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群