看板 Mathematica 關於我們 聯絡資訊
※ 引述《abbybao (小寶)》之銘言: : 1.在座標中給定三個點形成一個三角形 : 要怎麼求在這個三角形內包含的所有座標? : ex: (0,0) (3,0) (3,3)包含了(2,1) 一點(邊界的點不算) test[x_,y_]:=Boole[{y>0&&-3+x<0&&x-y>0}][[1]] Select[Flatten[Table[{x,y},{x,0,3},{y,0,3}],1],test@#==1&] : 2.http://ppt.cc/nD~K : 求兩切線 ContourPlot[2x^3+2y^3==9x*y,{x,0,10},{y,0,10}, Epilog->{Red,PointSize[0.1],Point[{6,6}]}] m[x_,y_]=Dt[y,x]/.Solve[Dt[2x^3+2y^3==9x*y,x],Dt[y,x]][[1]] ans={x,y}/.Solve[{2x^3+2y^3==9x*y,y-6==m[x,y](x-6)},{x,y}] y-#[[2]]==m@@#*(x-#[[1]])&/@ans[[1;;2]] ContourPlot[2x^3+2y^3==9x*y,{x,0,10},{y,0,10}, Epilog->{Line[{ans[[1]],{6,6}}],Line[{ans[[2]],{6,6}}], Red,PointSize[0.1],Point[{6,6}]}] : 3.http://ppt.cc/ydlH : 求面積 : 我的意思是有沒有指令是可以把邊界條件打出來它會幫你算面積 : ex: 此題邊界條件為 y= 2x-x^2 , y= x-2 Integrate[Abs[2x-x^2-(x-2)],Flatten@{x,x/.Solve[2x-x^2==(x-2),x]}] : 4.列出100的所有質數 Select[{#,PrimeQ[#]}&/@Range[100],#[[2]]==True&][[All,1]] : 拜託大家了,謝謝^^ http://chungyuandye.twbbs.org/2010/07/mathematica_11.html http://chungyuandye.twbbs.org/2010/07/mathematica_18.html -- 我打研究室走過 那獨坐電腦前的容顏如苦瓜的糾結 靈感不來 長壽的煙霧不散 研究室如小小的寂寞的城 恰如商管的電梯向晚 http://chungyuandye.twbbs.org -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.233.128.85 ※ 編輯: chungyuandye 來自: 118.233.128.85 (11/21 13:32)
abbybao:哇靠,太強了,真的有辦法做出來,不過第一題我執行後是 11/21 16:49
abbybao:空集合,不知道是哪邊出問題 http://ppt.cc/SKtY 11/21 16:50
abbybao:應該想說會有一點(2,1)出來 11/21 16:50
chungyuandye:改成test@@# 11/21 21:05