声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1639|回复: 2

[综合讨论] 求解一个行列式中未知数的值

[复制链接]
发表于 2013-6-17 14:35 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
syms r
k1=2;
k=2;
k2=2;
t=3;
L=1;
L1=0.4;
C=[1,0,-1,0,0,0,0,0;
     k1,t*r^3,k1,-t*r^3,0,0,0,0;
     0,0,0,0,cosh(r*L),sinh(r*L),-cos(r*L),-sin(r*L);
     0,0,0,0,t*sinh(r*L)*r^3-k2*cosh(r*L),t*cosh(r*L)*r^3-k2*sinh(r*L),t*sin(r*L)*r^3-k2*cos(r*L),-t*cos(r*L)*r^3-k2*sin(r*L);
     cosh(r*L1),sinh(r*L1),cos(r*L1),sin(r*L1),-cosh(r*L1),-sinh(r*L1),-cos(r*L1),-sin(r*L1);
     cosh(r*L1),sinh(r*L1),-cos(r*L1),-sin(r*L1),-cosh(r*L1),-sinh(r*L1),cos(r*L1),sin(r*L1)*r^2;
     t*sinh(r*L1)*r^3+k*cosh(r*L1),t*cosh(r*L1)*r^3+k*sinh(r*L1),t*sin(r*L1)*r^3+k*cos(r*L1),-t*cos(r*L1)*r^3+k*sin(r*L1),-t*sinh(r*L1)*r^3,-t*cosh(r*L1)*r^3,-t*sin(r*L1)*r^3,t*cos(r*L1)*r^3;
   sinh(r*L1),cosh(r*L1),-sin(r*L1),cos(r*L1),-sinh(r*L1),-cosh(r*L1),sin(r*L1),-cos(r*L1)]
怎么求解未知数r?我用的是det(C)和solve  但是求不出解来,求指导!


回复
分享到:

使用道具 举报

发表于 2013-6-17 15:35 | 显示全部楼层
楼主 稍微改了一下你的求解思路
1、不用符号计算了 改成匿名函数
2、因为只计算r一个未知数 看做的关于r的一元函数 所以采用了fzero来求解 初始值设置的为随机(rand)

程序如下:

>> k1=2;
k=2;
k2=2;
t=3;
L=1;
L1=0.4;
>> y=@(r)det([1,0,-1,0,0,0,0,0;
     k1,t*r^3,k1,-t*r^3,0,0,0,0;
     0,0,0,0,cosh(r*L),sinh(r*L),-cos(r*L),-sin(r*L);
     0,0,0,0,t*sinh(r*L)*r^3-k2*cosh(r*L),t*cosh(r*L)*r^3-k2*sinh(r*L),t*sin(r*L)*r^3-k2*cos(r*L),-t*cos(r*L)*r^3-k2*sin(r*L);
     cosh(r*L1),sinh(r*L1),cos(r*L1),sin(r*L1),-cosh(r*L1),-sinh(r*L1),-cos(r*L1),-sin(r*L1);
     cosh(r*L1),sinh(r*L1),-cos(r*L1),-sin(r*L1),-cosh(r*L1),-sinh(r*L1),cos(r*L1),sin(r*L1)*r^2;
     t*sinh(r*L1)*r^3+k*cosh(r*L1),t*cosh(r*L1)*r^3+k*sinh(r*L1),t*sin(r*L1)*r^3+k*cos(r*L1),-t*cos(r*L1)*r^3+k*sin(r*L1),-t*sinh(r*L1)*r^3,-t*cosh(r*L1)*r^3,-t*sin(r*L1)*r^3,t*cos(r*L1)*r^3;
   sinh(r*L1),cosh(r*L1),-sin(r*L1),cos(r*L1),-sinh(r*L1),-cosh(r*L1),sin(r*L1),-cos(r*L1)]);
>> s=fzero(y,rand)

s =

    0.8897

>>

最后问一句:楼主你是要求|C|=0不?

评分

1

查看全部评分

 楼主| 发表于 2013-6-17 16:32 | 显示全部楼层
本帖最后由 woaiwo 于 2013-6-17 16:34 编辑

对对,不好意思,忘写了。太感谢你了。再问一下,这个r只有一个解吗?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-11-29 00:49 , Processed in 0.060544 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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