Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Rで有理関数をプロットすることは可能ですか?例えば:
curve(((x+2)*(x-5))/((x-3)*(x+1)), from=-8,to=9)x=-1およびx=4で関数を定義できないため、正しくないプロットが表示されます
curve(((x+2)*(x-5))/((x-3)*(x+1)), from=-8,to=9)
どうもありがとう
Rは、漸近的な爆発でさえかなり優雅に処理するようです。
curve( (x-5)*(x-3)/( (x+1)*(x-4) ), 3 ,5)
不連続性の場合を処理するには、n「y」を増やして、しきい値を超えるNAに置き換えます。
n
vals <- curve( (x-5)*(x-3)/( (x+1)*(x-4) ), -3 ,5, n=1000) is.na(vals$y) <- abs(vals$y) > 100 plot(vals, type="l")