24小时热门版块排行榜    

CyRhmU.jpeg
查看: 1115  |  回复: 8

zhqh2000

新虫 (初入文坛)

[求助] MATLAB新手求解方程

方程为
0.84*h^0.96*(1-h)^0.28*[0.96/h-0.28/(1-h)]=0.58
求解h
帮帮忙,多谢啦
回复此楼

» 猜你喜欢

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

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

lghlgh2006

银虫 (初入文坛)

【答案】应助回帖

感谢参与,应助指数 +1
>> solve('0.84*h^0.96*(1-h)^0.28*[0.96/h-0.28/(1-h)]-0.58')
ans =

                                          0.40438914678629249107423901766733

//其他复数解不需要的话
2楼2012-09-28 18:54:04
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zhqh2000

新虫 (初入文坛)

引用回帖:
2楼: Originally posted by lghlgh2006 at 2012-09-28 18:54:04
>> solve('0.84*h^0.96*(1-h)^0.28*-0.58')
ans =

                                          0.40438914678629249107423901766733

//其他复数解不需要的话

奇怪了,我也是这么写的,可是MATLAB老是提醒我ERROR,怎么回事?
3楼2012-09-28 20:10:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

感谢参与,应助指数 +1
引用回帖:
3楼: Originally posted by zhqh2000 at 2012-09-28 20:10:05
奇怪了,我也是这么写的,可是MATLAB老是提醒我ERROR,怎么回事?...

出错提示信息是什么?
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.
4楼2012-09-28 20:52:46
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zhqh2000

新虫 (初入文坛)

引用回帖:
4楼: Originally posted by dbb627 at 2012-09-28 20:52:46
出错提示信息是什么?...

Error using ==> solve at 162
Unable to find closed form solution.
5楼2012-09-29 08:58:51
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★
csgt0: 金币+2, 多谢应助 2012-10-25 09:45:49
你用的是什么版本的 我的matlab2010b没有问题

solve('0.84*h^0.96*(1-h)^0.28*(0.96/h-0.28/(1-h))-0.58')

ans =

                                          0.40438914678629249107423901766733
   0.28242508743785675212378783600029*i + 0.68485983116645460481483237103467
  0.025261350451946424196232116787958*i + 0.88804064649824549462952858529713
  0.88242678564717099262620693617147 - 0.086912324609154520445777531267815*i
     0.837722933370675359758547838529 - 0.19715352779809435610761564431393*i
  0.086912324609154520445777531267815*i + 0.88242678564717099262620693617147
0.88840275568841653641010680329821 - 0.0083026515809469118791064689033959*i
   0.15158966349478430780597149595942*i + 0.86393917623804668124201173756784
   0.55360389793940331487078170455609 - 0.25686038893774939924867955009193*i
  0.043334766707807347711263310705364*i + 0.88719299728611080414236295169951
  0.063460723299533291511882386883474*i + 0.88554815317436561609737102311783
    0.1512346729831002405177042820611*i + 0.44388752771653864759936089827795
    0.44388752771653864759936089827795 - 0.1512346729831002405177042820611*i
0.0083026515809469118791064689033959*i + 0.88840275568841653641010680329821
   0.68485983116645460481483237103467 - 0.28242508743785675212378783600029*i
   0.25686038893774939924867955009193*i + 0.55360389793940331487078170455609
   0.78325856333937625662743118225575 - 0.24829081687892619187566413267287*i
   0.24829081687892619187566413267287*i + 0.78325856333937625662743118225575
  0.88719299728611080414236295169951 - 0.043334766707807347711263310705364*i
  0.88554815317436561609737102311783 - 0.063460723299533291511882386883474*i
   0.87634151338075912306369329807059 - 0.11549178773547345671593076836971*i
   0.86393917623804668124201173756784 - 0.15158966349478430780597149595942*i
   0.11549178773547345671593076836971*i + 0.87634151338075912306369329807059
  0.88804064649824549462952858529713 - 0.025261350451946424196232116787958*i
     0.19715352779809435610761564431393*i + 0.837722933370675359758547838529
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.
6楼2012-09-29 09:03:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zhqh2000

新虫 (初入文坛)

引用回帖:
6楼: Originally posted by dbb627 at 2012-09-29 09:03:47
你用的是什么版本的 我的matlab2010b没有问题

solve('0.84*h^0.96*(1-h)^0.28*(0.96/h-0.28/(1-h))-0.58')

ans =

                                          0.40438914678629249107423901766733
    ...

我是2007b版本了,试过n遍了,还不行啊,这才来求助的
7楼2012-09-29 09:06:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

我了解了,2007b用的是maple符号计算引擎,之后的matlab用的mupab引擎,他们的结果不一样正常。你换个高版本算下就没问题了
solve('0.84*h^0.96*(1-h)^0.28*[0.96/h-0.28/(1-h)]-0.58')

ans =

                                                 0.40438914678629249107423901766733
   0.28242508743785675212378783600029*sqrt(-1) + 0.68485983116645460481483237103467
  0.025261350451946424196232116787958*sqrt(-1) + 0.88804064649824549462952858529713
  0.88242678564717099262620693617147 - 0.086912324609154520445777531267815*sqrt(-1)
     0.837722933370675359758547838529 - 0.19715352779809435610761564431393*sqrt(-1)
  0.086912324609154520445777531267815*sqrt(-1) + 0.88242678564717099262620693617147
0.88840275568841653641010680329821 - 0.0083026515809469118791064689033959*sqrt(-1)
   0.15158966349478430780597149595942*sqrt(-1) + 0.86393917623804668124201173756784
   0.55360389793940331487078170455609 - 0.25686038893774939924867955009193*sqrt(-1)
  0.043334766707807347711263310705364*sqrt(-1) + 0.88719299728611080414236295169951
  0.063460723299533291511882386883474*sqrt(-1) + 0.88554815317436561609737102311783
    0.1512346729831002405177042820611*sqrt(-1) + 0.44388752771653864759936089827795
    0.44388752771653864759936089827795 - 0.1512346729831002405177042820611*sqrt(-1)
0.0083026515809469118791064689033959*sqrt(-1) + 0.88840275568841653641010680329821
   0.68485983116645460481483237103467 - 0.28242508743785675212378783600029*sqrt(-1)
   0.25686038893774939924867955009193*sqrt(-1) + 0.55360389793940331487078170455609
   0.78325856333937625662743118225575 - 0.24829081687892619187566413267287*sqrt(-1)
   0.24829081687892619187566413267287*sqrt(-1) + 0.78325856333937625662743118225575
  0.88719299728611080414236295169951 - 0.043334766707807347711263310705364*sqrt(-1)
  0.88554815317436561609737102311783 - 0.063460723299533291511882386883474*sqrt(-1)
   0.87634151338075912306369329807059 - 0.11549178773547345671593076836971*sqrt(-1)
   0.86393917623804668124201173756784 - 0.15158966349478430780597149595942*sqrt(-1)
   0.11549178773547345671593076836971*sqrt(-1) + 0.87634151338075912306369329807059
  0.88804064649824549462952858529713 - 0.025261350451946424196232116787958*sqrt(-1)
     0.19715352779809435610761564431393*sqrt(-1) + 0.837722933370675359758547838529

>> h=ans.1;
>> h=ans(1);
>> 0.84*h^0.96*(1-h)^0.28*[0.96/h-0.28/(1-h)]-0.58

ans =

1.8367099231598242312011508394098*10^(-40)
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-09-29 09:20:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zhqh2000

新虫 (初入文坛)

高手啊,换了个2010b的,果然算出来了,太感谢您啦
9楼2012-09-30 09:38:07
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zhqh2000 的主题更新
信息提示
请填处理意见