Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Anybody know how to input a 20db/octave slope in matlab?

FusionITR

Member
I'm new to using matlab and I was wondering how do make a graph with a -20db/octave slope for modeling filters?

For example, say I want to make a graph where y = 0 until 1000, then i want the graph to have a -20db/octave slope until 100,000.

Anybody know how ot put a function like that into matlab?
 
Ugh yes I meant decade, not octave sorry.

Yeah, I meant that I wanted to know how to make a slope of 20db/decade without putting in a actual transfer function.
 
A simple filter with a series resistor then a capacitor to ground makes a 20dB/decade lowpass filter.
Why sim such a simple filter. You should see its gradual rolloff with your eyes closed.
 
Russlk said:
"Yeah, I meant that I wanted to know how to make a slope of 20db/decade without putting in a actual transfer function."

Sorry, that does not make sense.

This is want I want to do.

Make a semilog plot from 1 to 1MHz. Take a abitary point (say f = 1kHz) and make a slope of -20db/decade unti say f=100kHz then go flat again.

Something like this:

**broken link removed**

This is in no way a strange question to ask, as there are already matlab gui's that do this such as https://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=2664&objectType=file

I just wanted to know if anybody here knew how to put this into matlab. I am very new to matlab (just got it last week) and have no idea how to do this.
 

Latest threads

Back
Top