24小时热门版块排行榜    

查看: 1416  |  回复: 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

金虫 (正式写手)

★ ★
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的回帖

fspdlh

金虫 (正式写手)

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

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

pdeliuyong

银虫 (小有名气)

有的,a=31.4*31.4,b=62.8*62.8,c=3.14/4,t=0
6楼2009-03-23 20:43:46
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 pdeliuyong 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 面上意见出来了 +12 黄鸟于飞Chao 2026-08-29 21/1050 2026-08-31 18:04 by 异氰酸酯
[基金申请] 能否申诉? +7 echo8914667 2026-08-30 8/400 2026-08-31 17:00 by yihongxu
[基金申请] 29号明天会评吗 +4 笨笨唐 2026-08-28 4/200 2026-08-31 09:30 by huixian257
[基金申请] 为什么到现在没收到通知? +5 tannykie 2026-08-29 5/250 2026-08-30 21:05 by purplejack
[基金申请] 有没有仍没收到信息的 +7 德尚中行 2026-08-27 8/400 2026-08-30 20:52 by purplejack
[考博] 找导师 +6 yuanjiabao 2026-08-29 7/350 2026-08-30 14:40 by 生科新手
[基金申请] 麻烦专家们看看评委们的意见(F口面上) +6 gdd2018 2026-08-28 11/550 2026-08-30 08:58 by 超级无敌华子
[基金申请] 我就是申请一个面上项目而已,这评审意见是按照杰青的条件评的吧? +6 gouxfjh 2026-08-28 11/550 2026-08-30 07:57 by gouxfjh
[基金申请] 2026年叶企孙基金 +4 bud_bud 2026-08-27 7/350 2026-08-29 07:23 by foolishmani
[基金申请] 为什么资助数各大高校都创新高,自己申请怎么就这么难 +12 Kittylucky 2026-08-27 13/650 2026-08-29 00:04 by superceng
[基金申请] 系统查不到 +11 董八千 2026-08-26 11/550 2026-08-28 18:06 by Leogzhya
[基金申请] 基金系统什么内容也没有 30+4 winsaint 2026-08-27 9/450 2026-08-28 11:06 by maolC
[基金申请] 看板上这么多中的,有点像50人群里49个人都是骗子的那种感觉…… +5 a089 2026-08-26 6/300 2026-08-27 14:05 by jonewore
[基金申请] 2026年8月25日国自然放榜前突然收到列入评审专家邮件,有关系吗? +25 木水思豆 2026-08-25 28/1400 2026-08-26 14:53 by draco1987
[基金申请] 出来了 +9 trojank 2026-08-26 9/450 2026-08-26 14:25 by 宝贝虫子
[基金申请] 国合里面能看到了 +7 一怀馨秋 2026-08-26 7/350 2026-08-26 11:23 by zhaosm1982
[基金申请] 系统进不去 +4 yanglien 2026-08-26 5/250 2026-08-26 11:10 by wenfengw83
[基金申请] 项目信息和经费信息在系统里都可以看到了 +6 wittyboy 2026-08-26 14/700 2026-08-26 10:55 by wittyboy
[基金申请] 今天务委会开完了,明天出结果吗 +19 angus9576 2026-08-25 23/1150 2026-08-26 10:03 by zp519
[基金申请] 在坚冰还盖着北海的时候,我看到了怒放的梅花。 (金币+10) +6 ziyangfang 2026-08-25 9/450 2026-08-25 20:26 by huagongfeihu
信息提示
请填处理意见