[問題] 積分的問題已回收

看板MATLAB作者 (沒人懂我...)時間15年前 (2010/05/20 16:15), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
現在有個函數 r'(t) = √(2+(1/t^2)+2*lnt+(lnt)^2) 我想算積分範圍 1 ~ 2 的數值 取到小數第四位 可是我不知道怎麼在MATLAB上面打 我打了這樣: >> y=(2+(log(x)).^2+2.*log(x)+(1/(x.*x))) ??? Error using ==> mrdivide Matrix dimensions must agree. 我不懂這是什麼意思><" 直接這樣子打: L=quad(@(x)(2+(log(x)).^2+2.*log(x)+(1/(x.*x))),1,2,1e-5) ??? Error using ==> mrdivide Matrix dimensions must agree. 也是錯 請問一下我要怎麼修正 原PO很新 QQ 上網找都是漂亮的函數範例 我的函數很醜~"~ 希望有人可以教我@@ // 問題二: Find, correct to four decimal places, the length of the curve of intersection of the cylinder 4x^2+y^2=4 and the plane x+y+z=2. 用MATLAB要怎麼算呢~"~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.169.143.145

05/20 17:42, , 1F
ans1:錯在1/(x.*x) /前面要有.
05/20 17:42, 1F
文章代碼(AID): #1BzE-gxY (MATLAB)
文章代碼(AID): #1BzE-gxY (MATLAB)