我想擬合/繪製指數函數,但它不起作用。對於指數函數在r中不起作用,但pol是
before_database.frame<- read.table("APD_data.txt",
header = TRUE,
sep = "",
dec="."
)
Single_APD.frame<- before_database.frame[before_database.frame$Serial_number==912009913, ]
# fit<- lm(Voltage ~ poly(Amplification,2), data=Single_APD.frame)
fit<- lm(Voltage ~ exp(Amplification), data=Single_APD.frame)
我收到:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'x'
但 「〜聚(擴增,2)」 的作品。哪裏不對?我已經在查找錯誤,但解決方案對我無效。 謝謝!
你能展示範圍輸出(Single_APD.frame $ Amplification)'? – CPak
'exp'很容易炸掉 – platypus
@ChiPak當然,它是「[1] 1.00252 1903.74000」 – Ben