mirror of
https://github.com/BreizhHardware/TD-R.git
synced 2026-01-18 16:47:34 +01:00
fix(plot type): correct the plot type in the rectangle method
- Changed the plot type from "list" to "l" for the rectangle method graph.
This commit is contained in:
@@ -30,7 +30,7 @@ y_vals <- f(x_vals)
|
||||
integrale_rect <- sum(y_vals * dx)
|
||||
|
||||
print(integrale_rect)
|
||||
plot(x_vals, y_vals, type = "list", col = "blue", lwd = 2,
|
||||
plot(x_vals, y_vals, type = "l", col = "blue", lwd = 2,
|
||||
main = "Methode des rectangles pour l'integrale",
|
||||
xlab = "x", ylab = "f(x)")
|
||||
rect(x_vals[-n], 0, x_vals[-1], y_vals[-n], col = rgb(0, 0, 1, 0.2), border = NA)
|
||||
Reference in New Issue
Block a user