MATLAB: How to design a fir filter by the frequency response curve.

filter design

Now I have a filter's frequency response curve,it look like a bandstop filter,but not a strict bandstop. y =
664
628
588
552
512
476
444
416
400
380
364
352
344
332
324
316
312
308
296
296
288
284
280
280
276
272
272
264
264
256
256
248
248
240
232
216
216
208
212
216
216
224
228
232
232
236
240
240
236
240
240
244
244
244
244
244
244
244
244
244
248
248
248
248
248
252
252
252
252
252
252
252
252
256
256
256
256
256
256
256
260
260
260
264
264
264
264
264
264
268
264
268
272
268
272
272
272
272
272
272
280
288
296
308
312
320
328
340
348
356
364
372
384
392
400
408
416
420
432
436
444
448
456
464
472
476
484
488
492
500
504
508
516
520
524
528
536
536
540
544
548
552
552
560
564
564
564
568
572
572
576
580
580
580
584
588
588
588
592
588
596
596
596
600
600
604
604
604
604
604
604
608
612
612
612
612
612
616
616
616
620
620
620
620
624
624
620
624
628
628
632
636
640
644
648
652
648
652
652
656
and frequence = x =
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730
740
750
760
770
780
790
800
810
820
830
840
850
860
870
880
890
900
910
920
930
940
950
960
970
980
990
1000
1100
1200
1300
1400
1500
1600
1700
1800
1900
2000
2100
2200
2300
2400
2500
2600
2700
2800
2900
3000
3100
3200
3300
3400
3500
3600
3700
3800
3900
4000
4100
4200
4300
4400
4500
4600
4700
4800
4900
5000
5100
5200
5300
5400
5500
5600
5700
5800
5900
6000
6100
6200
6300
6400
6500
6600
6700
6800
6900
7000
7100
7200
7300
7400
7500
7600
7700
7800
7900
8000
8100
8200
8300
8400
8500
8600
8700
8800
8900
9000
9100
9200
9300
9400
9500
9600
9700
9800
9900
10000
11000
12000
13000
14000
15000
16000
17000
18000
19000
20000.How can I do to design a FIR filter using the fdatool?

Best Answer

This is basically a frequency response synthesis problem. If you have Signal Processing Toolbox, take a look at the following documentation:
>> doc firls
>> doc fdesign.arbmag
If you have DSP System Toolbox or Filter Design Toolbox, you can also try the following
>> doc fdesign.arbmagnphase
HTH