My walkthrough:
1) matlab, e.g. A=[3+4i 4+3i 5+2.3i 6 3.4i]
2) copy A to clipboard: clipboard('copy', A)
3) with xclip and sed, the clipboard's content is converted to
something python understands: xclip -o -selection c | sed -r -e
's/^\[//' -e 's/\]$//' -e 's/ /,/g' -e 's/i\*([^,]*),/\1j,/g' -e
's/i\*(.*)$/\1j/' > taps_c.txt
4) from numpy import *
5) e.g. self.filter = gr.interp_fir_filter_ccc(1,
genfromtxt("taps_c.txt", dtype="complex", delimiter=","))

Cheers,
Gregor

2010/4/21 Umair Naeem <ar...@student.chalmers.se>:
> I need to import complex filter taps from a .txt file and use them in FFT 
> FIlter block in GRC. How can I do that?
>
>
> Regards,
> Umair Naeem
> MSc Communication Engineering
> Chalmers University ot Technology, Sweden.
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to