24小时热门版块排行榜    

CyRhmU.jpeg
南方科技大学公共卫生及应急管理学院2026级博士研究生招生报考通知(长期有效)
查看: 1317  |  回复: 11
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

nqf1987

新虫 (初入文坛)

[求助] 初学matlab 求解方程 大家帮帮忙啊。。。

求解 方程 0.022*ρ^2*(sin(θ))^2+x*cos(θ)-25.63=0   
其中θ=0*pi/180:1*pi/180:90*pi/180   
求出各个θ所对应的ρ值。
大家帮帮忙啦。。非常感谢。。。
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

★ ★ ★
nqf1987: 回帖置顶 2012-03-29 17:09:48
余泽成: 金币+3, 谢谢参与应助! 2012-03-30 14:18:13
>> syms p x
>> pp=solve('0.022*p^2*(sin(x))^2+p*cos(x)-25.63=0 ','p')

pp =

-(0.00000000000000000000000000000025*(90909090909090909090909090909091.0*cos(x) - 90909090909090909090909090909091.0*(cos(x)^2 + 2.25544*sin(x)^2)^(1/2)))/sin(x)^2
-(0.00000000000000000000000000000025*(90909090909090909090909090909091.0*cos(x) + 90909090909090909090909090909091.0*(cos(x)^2 + 2.25544*sin(x)^2)^(1/2)))/sin(x)^2

>> x=0*pi/180:1*pi/180:90*pi/180;
>> p1=@(x)eval(pp(1))

p1 =

    @(x)eval(pp(1))

>> pp1=feval(p1,x)

pp1 =

  Columns 1 through 5

       NaN   25.6295   25.6280   25.6255   25.6221

  Columns 6 through 10

   25.6178   25.6126   25.6066   25.5999   25.5925

  Columns 11 through 15

   25.5845   25.5760   25.5671   25.5579   25.5485

  Columns 16 through 20

   25.5390   25.5296   25.5203   25.5113   25.5028

  Columns 21 through 25

   25.4948   25.4875   25.4809   25.4754   25.4709

  Columns 26 through 30

   25.4676   25.4656   25.4651   25.4662   25.4691

  Columns 31 through 35

   25.4738   25.4805   25.4893   25.5004   25.5138

  Columns 36 through 40

   25.5297   25.5482   25.5694   25.5934   25.6204

  Columns 41 through 45

   25.6504   25.6837   25.7202   25.7601   25.8036

  Columns 46 through 50

   25.8507   25.9015   25.9562   26.0149   26.0776

  Columns 51 through 55

   26.1446   26.2159   26.2916   26.3719   26.4569

  Columns 56 through 60

   26.5468   26.6416   26.7414   26.8465   26.9569

  Columns 61 through 65

   27.0729   27.1945   27.3219   27.4553   27.5949

  Columns 66 through 70

   27.7407   27.8931   28.0521   28.2180   28.3909

  Columns 71 through 75

   28.5712   28.7589   28.9544   29.1578   29.3695

  Columns 76 through 80

   29.5896   29.8185   30.0564   30.3036   30.5606

  Columns 81 through 85

   30.8275   31.1047   31.3926   31.6916   32.0022

  Columns 86 through 90

   32.3246   32.6594   33.0070   33.3680   33.7428

  Column 91

   34.1321

>> p2=@(x)eval(pp(2))

p2 =

    @(x)eval(pp(2))

>> pp2=feval(p2,x)

pp2 =

  1.0e+005 *

  Columns 1 through 5

      -Inf   -1.4924   -0.3732   -0.1660   -0.0934

  Columns 6 through 10

   -0.0599   -0.0416   -0.0306   -0.0235   -0.0186

  Columns 11 through 15

   -0.0151   -0.0125   -0.0105   -0.0090   -0.0078

  Columns 16 through 20

   -0.0068   -0.0060   -0.0053   -0.0048   -0.0043

  Columns 21 through 25

   -0.0039   -0.0036   -0.0033   -0.0030   -0.0028

  Columns 26 through 30

   -0.0026   -0.0024   -0.0022   -0.0021   -0.0019

  Columns 31 through 35

   -0.0018   -0.0017   -0.0016   -0.0015   -0.0015

  Columns 36 through 40

   -0.0014   -0.0013   -0.0013   -0.0012   -0.0011

  Columns 41 through 45

   -0.0011   -0.0011   -0.0010   -0.0010   -0.0009

  Columns 46 through 50

   -0.0009   -0.0009   -0.0008   -0.0008   -0.0008

  Columns 51 through 55

   -0.0008   -0.0007   -0.0007   -0.0007   -0.0007

  Columns 56 through 60

   -0.0007   -0.0006   -0.0006   -0.0006   -0.0006

  Columns 61 through 65

   -0.0006   -0.0006   -0.0005   -0.0005   -0.0005

  Columns 66 through 70

   -0.0005   -0.0005   -0.0005   -0.0005   -0.0005

  Columns 71 through 75

   -0.0005   -0.0005   -0.0004   -0.0004   -0.0004

  Columns 76 through 80

   -0.0004   -0.0004   -0.0004   -0.0004   -0.0004

  Columns 81 through 85

   -0.0004   -0.0004   -0.0004   -0.0004   -0.0004

  Columns 86 through 90

   -0.0004   -0.0004   -0.0004   -0.0003   -0.0003

  Column 91

   -0.0003

>>
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
8楼2012-03-29 16:16:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 12 个回答

dingd

铁杆木虫 (职业作家)

【答案】应助回帖


感谢参与,应助指数 +1
余泽成: 金币+1, 谢谢参与应助! 2012-03-30 14:18:21
应该有些范围限制吧?否则三角函数会导致非一一对应现象。
2楼2012-03-28 13:58:44
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

nqf1987

新虫 (初入文坛)

引用回帖:
2楼: Originally posted by dingd at 2012-03-28 13:58:44:
应该有些范围限制吧?否则三角函数会导致非一一对应现象。

非常谢谢你  不知道 限制ρ>0  行不行    给你不给出限制每个θ应该对应两个ρ  
还有就是 我第一次发帖 粗心的呢 0.022*ρ^2*(sin(θ))^2+ρ  *cos(θ)-25.63=0   这个公式才是对的 。。。。
3楼2012-03-28 14:13:57
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

nqf1987

新虫 (初入文坛)

求解 方程 0.022*ρ^2*(sin(θ))^2+ρ *cos(θ)-25.63=0   
              θ=0*pi/180:1*pi/180:90*pi/180   
            求出各个θ所对应的ρ值。ρ>0

第一次的方程出了点小错误。。。这个是对的。。。。
4楼2012-03-28 14:16:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见