24小时热门版块排行榜    

查看: 1394  |  回复: 5
当前主题已经存档。
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

pdeliuyong

银虫 (小有名气)

[交流] 【求助】求方程的正根

>> syms a b c t;
>> eq1=a*(cos(2*pi*(t+0.0001)))^2+b*(cos(2*pi*(t+0.0001)+c))^2-54.1852^2;
>> eq2=a*(cos(2*pi*(t+0.0002)))^2+b*(cos(2*pi*(t+0.0002)+c))^2-53.95478^2;
>> eq3=a*(cos(2*pi*(t+0.0003)))^2+b*(cos(2*pi*(t+0.0004)+c))^2-53.72272^2;
>> eq4=a*(cos(2*pi*(t+0.0004)))^2+b*(cos(2*pi*(t+0.0004)+c))^2-53.48904^2;
>> S=solve(eq1,eq2,eq3,eq4,a,b,c,t);
>> S.a,S.b,S.c,S.t
我想求上面4个方程的正根,上面的程序要如何添加

[ Last edited by woshilsh on 2009-5-22 at 13:03 ]
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

fspdlh

金虫 (正式写手)

说明你这个方程四个值都为正的解不存在

[ Last edited by fspdlh on 2009-3-22 at 10:50 ]
5楼2009-03-22 10:49:04
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 6 个回答

fspdlh

金虫 (正式写手)

★ ★
kuhailangyu(金币+2,VIP+0):谢谢参与! 3-22 20:48
把要搞成正根的未知数设为另一个数的平方啊
不过你这四个方程四个未知数刚好啊,如果那样有解吗?
2楼2009-03-22 10:09:14
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

pdeliuyong

银虫 (小有名气)

方程正根

按照你的作了,不行
syms a b c t;
eq1=(sqrt(a))^2*(cos(2*pi*((sqrt(t))^2+0.0001)))^2+(sqrt(b))^2*(cos(2*pi*((sqrt(t))^2+0.0001)+(sqrt(c))^2))^2-54.1852^2;
eq2=(sqrt(a))^2*(cos(2*pi*((sqrt(t))^2+0.0002)))^2+(sqrt(b))^2*(cos(2*pi*((sqrt(t))^2+0.0002)+(sqrt(c))^2))^2-54.1852^2;
eq3=(sqrt(a))^2*(cos(2*pi*((sqrt(t))^2+0.0003)))^2+(sqrt(b))^2*(cos(2*pi*((sqrt(t))^2+0.0003)+(sqrt(c))^2))^2-54.1852^2;
eq4=(sqrt(a))^2*(cos(2*pi*((sqrt(t))^2+0.0004)))^2+(sqrt(b))^2*(cos(2*pi*((sqrt(t))^2+0.0004)+(sqrt(c))^2))^2-54.1852^2;
S=solve(eq1,eq2,eq3,eq4,a,b,c,t);
S.a,S.b,S.c,S.t

ans =

2936.0358990400000038789585232735


ans =

2936.0358990400000038789585232735


ans =

413.11943394705781085783760490125


ans =

-170.00030647677566299912270803713
3楼2009-03-22 10:28:07
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

pdeliuyong

银虫 (小有名气)

恢复2楼

按照你的要求改了程序
>> syms a b c t;
eq1=(sqrt(a))^2*(cos(2*pi*((sqrt(t))^2+0.0001)))^2+(sqrt(b))^2*(cos(2*pi*((sqrt(t))^2+0.0001)+(sqrt(c))^2))^2-54.1852^2;
eq2=(sqrt(a))^2*(cos(2*pi*((sqrt(t))^2+0.0002)))^2+(sqrt(b))^2*(cos(2*pi*((sqrt(t))^2+0.0002)+(sqrt(c))^2))^2-53.95478^2;
eq3=(sqrt(a))^2*(cos(2*pi*((sqrt(t))^2+0.0003)))^2+(sqrt(b))^2*(cos(2*pi*((sqrt(t))^2+0.0003)+(sqrt(c))^2))^2-53.72272^2;
eq4=(sqrt(a))^2*(cos(2*pi*((sqrt(t))^2+0.0004)))^2+(sqrt(b))^2*(cos(2*pi*((sqrt(t))^2+0.0004)+(sqrt(c))^2))^2-53.48904^2;
S=solve(eq1,eq2,eq3,eq4,a,b,c,t);
S.a,S.b,S.c,S.t
Warning: Explicit solution could not be found.
> In solve at 170
??? Error using ==> subsref
Reference to non-existent field 'a'.

Error in ==> sym.subsref at 16
  y = builtin('subsref',struct(x),a);
4楼2009-03-22 10:37:00
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 帮忙看看fileCode +4 wwncly 2026-08-10 8/400 2026-08-10 22:07 by demonstreets
[基金申请] FileCode能看出啥? +7 要乐观耀哥 2026-08-10 15/750 2026-08-10 19:29 by 要乐观耀哥
[基金申请] filecode +8 documentary 2026-08-10 8/400 2026-08-10 19:20 by loufangrui
[基金申请] 确定了,国自然21号放榜 +6 布布和一二 2026-08-10 7/350 2026-08-10 19:15 by 2000zf36392
[基金申请] 综述论文作为代表作会不会影响评审专家的印象分? +10 yufeiwaner 2026-08-09 11/550 2026-08-10 18:47 by yufeiwaner
[基金申请] 为什么网上很多人说本周 12号出结果 +3 瞬息宇宙 2026-08-10 3/150 2026-08-10 18:27 by Tide man
[基金申请] 国自然结果 +4 Vierhys 2026-08-10 8/400 2026-08-10 15:06 by Vierhys
[基金申请] 应该是93bebmhtak前后十一个字符比较关键 +14 Lanmanbaby 2026-08-09 22/1100 2026-08-10 14:57 by wwncly
[基金申请] 据悉今年马上要出结果了 +7 瞬息宇宙 2026-08-10 8/400 2026-08-10 12:42 by Vivilian
[基金申请] 2026国自然放榜时间 +9 布布和一二 2026-08-08 9/450 2026-08-10 11:22 by xxxx2020
[基金申请] filecode与中标关系的预测 +5 布布和一二 2026-08-07 5/250 2026-08-09 16:15 by 袁向阳007
[基金申请] 关于豆爷回答的JTJC与%2F数量 +5 yang182083 2026-08-06 7/350 2026-08-08 18:29 by zhanghaozhu
[基金申请] 关于filecode +4 布布和一二 2026-08-07 7/350 2026-08-07 22:55 by zhanghaozhu
[基金申请] 化学口download_prp&fileCode的固定段好像这几天一直没变,有变的大神么? +3 Tide man 2026-08-07 4/200 2026-08-07 22:39 by Tide man
[基金申请] 固定端突然变了,今天 +6 archvillain 2026-08-06 10/500 2026-08-07 16:03 by 医学老男孩
[基金申请] filecode +8 布布和一二 2026-08-06 11/550 2026-08-06 20:41 by tangpu318
[基金申请] 求各位大神看下 100+6 hpkpkpkp 2026-08-05 33/1650 2026-08-06 14:49 by zhiyanjiang
[基金申请] 影响面上的因素 +8 布布和一二 2026-08-05 11/550 2026-08-06 10:41 by 宝贝虫子
[基金申请] 好消息?这个有何含义??? +8 Tide man 2026-08-05 10/500 2026-08-05 16:14 by xmuxiaoyu
[基金申请] 有没有H口的?有收到消息的吗? +3 超级海虾 2026-08-04 3/150 2026-08-04 17:26 by 学教育滴
信息提示
请填处理意见