# Interactive Function Plot

This notebook demonstrates an interactive plot using `ipywidgets` and `matplotlib` where the parameters of the function can be adjusted with sliders.

import numpy as np
import matplotlib.pyplot as plt
from ipywidgets import interact

# Define the function to visualize
def plot_function(a, b):
    x = np.linspace(0, 10, 100)
    y = a * np.sin(b * x)

    plt.figure(figsize=(8, 4))
    plt.plot(x, y)
    plt.title(f'Plot of y = {a} * sin({b} * x)')
    plt.xlabel('x')
    plt.ylabel('y')
    plt.grid(True)
    plt.show()

# Create interactive sliders for 'a' and 'b' parameters
interact(plot_function, a=(0.1, 5.0, 0.1), b=(0.1, 5.0, 0.1))