Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
filter design

Subject: filter design

From: Muhammad

Date: 4 Feb, 2012 13:07:30

Message: 1 of 8

Hi all!
      My question is that when we design a filter using fdatool, then what is the procedure to import the coefficients of filter in mfile??????


waiting for reply
Regards

Subject: filter design

From: Sadik

Date: 5 Feb, 2012 00:36:31

Message: 2 of 8

Hello Muhammad,

In the menu, you can do File -> Generate matlab code.

Best.

Subject: filter design

From: Nasser M. Abbasi

Date: 5 Feb, 2012 04:37:32

Message: 3 of 8

On 2/4/2012 6:36 PM, Sadik wrote:
> Hello Muhammad,
>
> In the menu, you can do File -> Generate matlab code.
>
> Best.

I think OP is asking for 'importing' his coefficients to the tool.

Isn't the above 'exporting' ?

OP said:

"then what is the procedure to import the coefficients of filter in mfile??????"

--Nasser

Subject: filter design

From: Sadik

Date: 5 Feb, 2012 13:02:10

Message: 4 of 8

Hi Nasser,

If you are on the m-file side, then you are importing it. :))

Putting the joke aside, from the context, I inferred that the OP intended to ask export rather than import. I might be wrong.

Best.

Subject: filter design

From: Muhammad

Date: 5 Feb, 2012 14:49:10

Message: 5 of 8

"Sadik " <sadik.hava@gmail.com> wrote in message <jgkiuf$2hl$1@newscl01ah.mathworks.com>...
> Hello Muhammad,
>
> In the menu, you can do File -> Generate matlab code.
>
thanx, i got that :)
> Best.

Subject: filter design

From: Nasser M. Abbasi

Date: 5 Feb, 2012 20:04:57

Message: 6 of 8

On 2/5/2012 7:02 AM, Sadik wrote:
> Hi Nasser,
>
> If you are on the m-file side, then you are importing it. :))

good point ;)

>
> Putting the joke aside, from the context, I inferred that the OP intended to ask
>export rather than import. I might be wrong.
>

I might be wrong also. But it sounded to me OP wanted to import to the tool
not export from the tool, as normally the tool is the main object in
this discussion.

But who knows, may be OP can come and clarify.

--Nasser

Subject: filter design

From: Muhammad

Date: 6 Feb, 2012 12:52:11

Message: 7 of 8

"Nasser M. Abbasi" <nma@12000.org> wrote in message <jgmnd5$2e4$1@speranza.aioe.org>...
> On 2/5/2012 7:02 AM, Sadik wrote:
> > Hi Nasser,
> >
> > If you are on the m-file side, then you are importing it. :))
>
> good point ;)
>
> >
> > Putting the joke aside, from the context, I inferred that the OP intended to ask
> >export rather than import. I might be wrong.
> >
>
> I might be wrong also. But it sounded to me OP wanted to import to the tool
> not export from the tool, as normally the tool is the main object in
> this discussion.
>
> But who knows, may be OP can come and clarify.
>
Actually my question was that when we design a filter using fda, how i can use that filter in my code?????????????? i guess import/export created the confusion............... :)

> --Nasser

Subject: filter design

From: Sadik

Date: 6 Feb, 2012 13:27:10

Message: 8 of 8

Alright. Then please go to the very first reply you've got. :D

You are going to generate the matlab code first and then it is going to show you how to generate the coefficients and you will probably see a line like the following at the very bottom:

Hd = dfilt.~~~

Then you are going to use this Hd as in

 y1 = filter(Hd,x);

where x is your input and y1 is your output.

Best.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us