Project

Plotting of a mathematical function utilizing Simulink

Question 1:

Plot a function: y(x) = (x-1) * (x-3)2 * (x-9)2 using basic Simulink blocks.

Solution:

  • Simulink blocks were used to plot the above function. The above function cannot be applicable only for a constant value of ‘x’, since the value of ‘x’ is not explicitly defined in the question. Hence, to execute the above function we will employ a ramp signal block. This is because based on the simulation stop time set up by the user, the value will run till this time. Therefore, the value of the input variable ‘x’ varies and the corresponding value of ‘y’ is calculated and displayed appropriately utilizing the display block.
  • In this problem, I have set the simulation 'Stop Time' as 10 sec.

Fig. 1: Simulink Block Diagram.

The various constants, ramp signal with the mathematical blocks and functions were appropriately connected to execute the given problem.

Result:

The output plot of the function is depicted below.

Fig. 2: Output obtained through the Scope block.

We can clearly observe that the graph is of curved nature and for every value of ‘x’ corresponding value of ‘y’ is plotted.

Hence, we have successfully executed the given function using the Simulink blocks.

***********

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.