How do you plot the amplitude response


$$Y=\dfrac{1}{\sqrt{R^2+\omega^2 L^2}}$$

That's it. I'm really struggling with symbolic math or converting it to a tf for bode plot and whenever I try to plot it, I'm not sure if I plotted it correctly with the equation I just get from thin air.

  • \$\begingroup\$ Isn't that the amplitude right there since there is no j or s? \$\endgroup\$
    – DKNguyen
    Commented Oct 8, 2021 at 15:29
  • 1
    \$\begingroup\$ A little hard to know if you've plotted it correctly unless you show us the plot \$\endgroup\$ Commented Oct 8, 2021 at 16:33
  • \$\begingroup\$ bodemag \$\endgroup\$
    – Syed
    Commented Oct 8, 2021 at 17:17
  • \$\begingroup\$ Victor, write more. There's not enough here to read between the lines. And my crystal ball is also broken. \$\endgroup\$
    – jonk
    Commented Oct 9, 2021 at 7:40

1 Answer 1


Plotting in MATLAB is typically not done symbolically. You need to do it the way you learned how to graph things in grade school: by evaluating the function at a few places and then connecting the dots.

Fortunately, you don't need to do the math by hand. Here's a basic example:

$$ y = x^2 + 4$$

  1. Evaluate the function at a few places: let's choose x = -2, -1, 0, 1, 2.
x y
-2 8
-1 5
0 4
1 5
2 8
  1. Connect the dots.

Let's see some code that does this.

x = [-2:2];
y = x.^2+4;

Output: enter image description here

You can see that MATLAB just draws lines between the data points, so if you want more resolution, you need more samples. For your equation, you can do the following:

w = logspace(0,8,1000);    % Creates a vector of 1000 points spaced logarithmically
Y = 1./sqrt(R^2+w.^2*L^2); % Calculates Y at every value of w.
semilogx(w,Y);             % Plots Y as a function of w on a log scale.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.