Re: [問題] 解一元方程式!!已回收

看板MATLAB作者 (123)時間15年前 (2010/10/05 23:07), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《kjoe33 (123)》之銘言: : 各位大大~ : 小弟在paper上面看到以下的方程式 : 2*sin^2(13*x)-269*sin^2(x)=0 : 因為想要把數字算出來比較 : 使用Matlab的solve('2*sin^2(13*x)-269*sin^2(x)','x') : 卻無法得到解~請各位大大幫忙~感恩~~ 謝謝各位大大~的確是小弟白癡了!!在請問各位大爺 小弟更正後~跑出的結果是 ans = 2*pi*k - 2*atan(z^(1/2)) 2*atan(z^(1/2)) + 2*pi*k 0 想跑出近似解~經過GOOGLE大神指導後使用封裝好的牛頓法~ 卻沒有辦法跑出答案~~跑出了 ??? Error using ==> inlineeval at 15 Error in inline expression ==> 2*sin(13*x)*sin(13*x)=269*sin(x)*sin(x) Error: The expression to the left of the equals sign is not a valid target for an assignment. Error in ==> inline.subsref at 27 INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr); Error in ==> newtraph at 21 xr = xr - func(xr)/dfunc(xr); 等字樣!該如何解出解呢???~請各位大大賜教 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.37.44.50

10/06 00:16, , 1F
作圖找起始值後用fzero求解
10/06 00:16, 1F
文章代碼(AID): #1Cgpz2c5 (MATLAB)
討論串 (同標題文章)
文章代碼(AID): #1Cgpz2c5 (MATLAB)