Skip to main content
19-Tanzanite
March 11, 2021
Question

Square, Sine and PiceWise Linear Waves/Functions

  • March 11, 2021
  • 4 replies
  • 7805 views

Hello Dear Friends,

Do you have any idea how to implement in Mathcad 15 the functions that generate the following graphs shown below?

Case 1:

CornelBejan_5-1615460678627.png

CornelBejan_4-1615460647797.png

CornelBejan_3-1615460608967.png

 

And if I change the parameters:

CornelBejan_7-1615460797770.png

CornelBejan_8-1615460820138.png

CornelBejan_26-1615462574787.png

 

 

Case 2:

 

a)

CornelBejan_11-1615461114717.png

CornelBejan_10-1615461094982.png

CornelBejan_14-1615461546057.png

 

 

b)

CornelBejan_16-1615461614655.png

CornelBejan_17-1615461626518.png

CornelBejan_15-1615461597509.png

 

 

c)

CornelBejan_20-1615461864632.png

CornelBejan_21-1615461877819.png

CornelBejan_19-1615461848108.png

 

 

Case 3:

 

CornelBejan_22-1615462100406.png

CornelBejan_24-1615462139898.png

CornelBejan_25-1615462475294.png

 

Thank you.
Best regards.

 

4 replies

23-Emerald IV
March 11, 2021

There are many ways that lead to Rome (or many another city).

What is your purpose with those functions:

- Do you just want to plot them?

- Do you need them to work numerically only?

- Are you going to use them symbolically?

- Do you intend to use them in (inverse) Fourier and/or Laplace transforms?

 

Luc

Cornel19-TanzaniteAuthor
19-Tanzanite
March 11, 2021

CornelBejan_0-1615464976732.png


All 4 points listed by you, if it is possible.

The first 3 would be the main ones.
If it exists symbolically then by customizing the values ​​it can be evaluated numerically, and then it can be plotted. But I have no idea yet how to build these functions.

23-Emerald I
March 11, 2021

All of your examples except this

Fred_Kohlhepp_0-1615467081730.png

can be simply achieved using either the Linterp or sine function along with some time limit constraints.

 

Let's see (from an Amethyst level member) a sheet at least showing your attempts.

25-Diamond I
March 12, 2021

Here is a function for the pulse wave for you to start with.
The function takes the same arguments in the same order as shown in your screenshot. However, the times that you show with arrows in the first picture "for clarity" seem to be quite inaccurate and misleading.

Werner_E_0-1615520985620.png

 

 

 

25-Diamond I
March 12, 2021

Here is a more compact version of the function posted above.
As you can see in the last example, symbolic operations won't work when used with units!
EDIT: See below.

Werner_E_0-1615555139294.png

EDIT My fault. The error occurs because I redefined t to be the range for plotting, should have used a different variable name (normally I use "t." in such cases as it looks like a normal "t".

Werner_E_0-1615587654554.png

So you see that the symbolic also works with units, but I can image that a useful result often will be demanded too much. As you should know the symbolic does not know anything about units and treats them as unknowns.

Cornel19-TanzaniteAuthor
19-Tanzanite
March 12, 2021

😍

 

Good.
Thank you very much.

I dare to ask if the following options would be possible:

CornelBejan_0-1615660328332.png

 

 

CornelBejan_1-1615660359731.png

 

 

CornelBejan_8-1615563171998.png

 

CornelBejan_0-1615564627671.png

 

CornelBejan_6-1615562554863.png

 

CornelBejan_7-1615563013043.png

 

21-Topaz II
March 12, 2021

Five pulse trains:

Five pulse trains.jpg

21-Topaz II
March 13, 2021

All in one without reference files: Signals, data, Fourier analysis, sampling, and reconstruction of the signal with Shannon's theorem ( To reduce processing times, you must reduce N1_, for example, N1_ = 25.). See attached file.