cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

11-Garnet

## Need help with plotting column matrix for bode plot

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.

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald III
(To:AS_9824434)

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:

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

16 REPLIES 16
23-Emerald I
(To:AS_9824434)

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

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
(To:LS_9861888)

Look up vectorize

24-Ruby V
(To:Fred_Kohlhepp)

You are replying to a SPAM posting 😉

The text was copied from here: https://de.maplesoft.com/support/help/maple/view.aspx?path=DynamicSystems%2FResponsePlot

The text should look innocent and appropriate for the forum at first glance and when after a while the posting has passed moderation, a SPAM-Link is added. Unfortunately a quite common method which can be seen on other forums as well.

23-Emerald I
(To:Werner_E)

Thanks for the tip!

I rarely chase links in these posts; if there isn't a file attached, or at least a picture, they aren't serious.  (And Malwarebytes has been very good at issuing warnings!)

11-Garnet
(To:Werner_E)

what sorry?

23-Emerald III
(To:AS_9824434)

Luc

23-Emerald III
(To:AS_9824434)

Maybe this helps

Success!
Luc

18-Opal
(To:LucMeekes)

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 III
(To:Cornel)

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

Success!

Luc

11-Garnet
(To:LucMeekes)

Hi Lucmeekes,

Thanks for that! I am looking at the file you attached.

Can you help me calculate the complex numbers for the specific frequencies in the 'w' vector? The file attached below has wrong values. However, in the bode plot you have plotted does do it correctly, I just need the complex numbers(Re and Im parts) and the gain(screenshot 227). How can I do this, I used vector 'w' but it does not work?

Of course this can be done by pen and paper but that will take too long.

23-Emerald III
(To:AS_9824434)

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:

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

18-Opal
(To:LucMeekes)

Why do we need to vectorize the h transfer function?

18-Opal
(To:Cornel)

Is it possible to increase the thickness of the numbers on the two axes (values ​​on the x and y axis) in the XY plot? Or this thing is possible just in the Chart Component?

23-Emerald III
(To:Cornel)

So far I have not found any settings to control the axis colour.

Luc

23-Emerald III
(To:Cornel)

We need to vectorize because f is a vector. You're plotting the same transfer function with respect to the variable freq. Now freq is undefined (you didn't define it before the plot) so Prime uses it as an automatic variable, and defines it as a range (that is something different from a vector ! ). While it is handy sometimes for plotting, this automatic variable is not well under your control.

Success!
Luc

Announcements
Top Tags