Skip to main content
1-Visitor
March 15, 2021
Solved

Need help with plotting column matrix for bode plot

  • March 15, 2021
  • 2 replies
  • 7017 views

Hi all,

I hope everyone is having a great day!

I am trying to plot a bode plot(i.e gain in dB w.r.t w in rads-1) at specific frequencies inputted in a vector/matrix. 

How then do I plot the column matrix('gaindB') with w(rad s-1) on the horizontal axis? 

The transfer function is given by f(s) where s represents laplace constant of j*w

I have attached my workings below. 

Best answer by LucMeekes

You have to vectorize your expressions (put an arrow above it, look that up in the 'Operators' section on the Math ribbon. It's in the lower-right corner:

LucMeekes_0-1615991044038.png

I'll leave the phase to you..

The table is easy to reproduce except for the argument at w=0.8. Note that the phase runs on negative continuously, but the argument of a complex number is generally limited to between -pi and pi, or -180 deg and 180 deg.

 

Success!
Luc

2 replies

23-Emerald I
March 15, 2021

Because gaindB is a vector taking the magnitude results in a scalar.  Vectorize:

Fred_Kohlhepp_0-1615815570943.png

 

1-Visitor
March 16, 2021

The numeric value on the right-hand side of each equation is substituted for the name on the left-hand side in the expressions that define the model. No checking is done during the substitution to determine whether the substituted value is valid.

23-Emerald I
March 16, 2021

Look up vectorize

Fred_Kohlhepp_0-1615894016056.png

 

23-Emerald IV
March 16, 2021

Maybe this helps

LucMeekes_0-1615919355608.png

 

Success!
Luc

 

19-Tanzanite
March 16, 2021

How to put grid in the graph in Mathcad Prime for Bode Plot (Magnitude & Phase Plot's)?

Or is it only possible if we use a chart component or something like that?

 

 

23-Emerald IV
March 16, 2021

The standard plot of Prime does not come with grids, but there are several methods to put in a grid.

The 3rd party add-on chart-component does provide grids, but it doesn't deal properly with units (as far as I know).

Here's the result of my grid routine

LucMeekes_0-1615928682317.png

Success!

Luc