diff --git a/rocketpy/mathutils/function.py b/rocketpy/mathutils/function.py index 9e6e07b9d..945d36d26 100644 --- a/rocketpy/mathutils/function.py +++ b/rocketpy/mathutils/function.py @@ -3171,7 +3171,7 @@ def savetxt( ) # Generate the data points using the callable x = np.linspace(lower, upper, samples) - data_points = np.column_stack((x, self.source(x))) + data_points = np.column_stack((x, self.get_value_opt(x))) else: # If the source is already an array, use it as is data_points = self.source