24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 1338  |  回复: 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的回帖

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的回帖
查看全部 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的回帖

fspdlh

金虫 (正式写手)

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

[ Last edited by fspdlh on 2009-3-22 at 10:50 ]
5楼2009-03-22 10:49:04
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 复试调剂 +10 呼呼?~+123456 2026-04-05 10/500 2026-04-05 08:59 by syjjj0321
[考研] 346分的生物与医药08600求调剂 +3 常雨阳上岸 2026-04-05 4/200 2026-04-05 07:52 by kang123k
[考研] 材料专硕322分 +11 哈哈哈吼吼吼哈 2026-04-02 11/550 2026-04-04 23:37 by 永字号
[考研] 材料调剂 +11 一样YWY 2026-04-02 13/650 2026-04-04 23:10 by 无际的草原
[考研] 材料334求调剂 +15 Eecho# 2026-04-03 15/750 2026-04-04 23:05 by 无际的草原
[考研] 考研调剂 +6 15615482637 2026-04-04 6/300 2026-04-04 22:43 by yu221
[考研] 一志愿上海大学生物学346 +3 上海大学346调剂 2026-04-03 3/150 2026-04-04 20:20 by dongzh2009
[考研] 0703求调剂383分 +8 W55j 2026-04-03 8/400 2026-04-04 20:09 by xhai2011
[考研] 一志愿沪985,326分求调剂 +3 刘墨墨 2026-04-03 3/150 2026-04-04 11:16 by 悲伤的芋头
[考研] 265求调剂 +20 梁梁校校 2026-04-01 21/1050 2026-04-04 00:38 by userper
[考研] 311求调剂 +11 勇敢的小吴 2026-04-02 11/550 2026-04-03 21:46 by qlm5820
[考研] 294求调剂 +6 Grey_Ey 2026-04-03 6/300 2026-04-03 20:46 by 欣喜777
[考研] 考研调剂 +3 Draa 2026-04-03 3/150 2026-04-03 17:37 by hgwz7468
[考研] 08工科,295,接受跨专业调剂 +8 lmnlzy 2026-03-30 8/400 2026-04-03 13:08 by nalakaiqi
[考研] 一志愿中国科学院大学265求调剂 +9 恬淡ye 2026-03-31 10/500 2026-04-03 11:10 by txp1986
[考研] 重庆大学材料与化工085600,初试370+,求求调剂建议 +8 shzhou_ 2026-04-01 9/450 2026-04-03 09:31 by 蓝云思雨
[考研] 学硕化学工程与技术,一志愿中国海洋大学320+求调剂 +8 披星河 2026-04-02 8/400 2026-04-02 14:12 by oooqiao
[考研] 08生物与医药专硕初试346找调剂 +6 dianeeee 2026-04-01 7/350 2026-04-02 08:23 by guoweigw
[考研] 生物学327,求调剂 +5 书上的梅子 2026-04-01 6/300 2026-04-02 06:47 by ilovexiaobin
[考研] 生物与医药考研调剂 +5 铁憨憨123425 2026-03-31 5/250 2026-04-01 18:01 by syh9288
信息提示
请填处理意见