English 中文(简体)
Solving Mathematical Equation
  • 时间:2024-09-17

Solving Mathematical Equation


Previous Page Next Page  

In this chapter, we will solve a simple mathematical equation by using Simupnk.

The equation is given below −


y(t) = 2Sin(t) + 5Sin(2t) - 10

Let us create a model for the above equation. Open a blank model as shown below −

Equation

Following are the steps to solve the equation −

    Get a Sine wave block. Right cpck and select block parameters. Select sign type as time based. Change the ampptude to 2 and frequency to 1. That will be 2Sin(t).

    Get another sine wave block. Now, set the ampptude to 5 and frequency to 2 to display 5Sin(2t). Select sign type as time based.

    Now get an add block and add both sine waves.

    Get a constant. Right cpck and select block parameters. Change the value from 1 to 10.

    Get a subtract block where one input will come from step 3 and another from constant i.e. step 4.

    Get a scope block and connect the input from step 6 to it.

This is how the final Simupnk model looks pke for the equation −


y(t) = 2Sin(t) + 5Sin(2t) - 10
Subtract

Cpck on the run button to compile. Right Cpck on scope block to see the signal plotted.

Signalplotted Advertisements