Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

problem to generate .coe file

sir i want to create .coe file for hamming window,for further use it in block ram. problem is,.coe file is generated without any coefficients in it.following is my code :

clear all

N=32;

wr = hamming (N);

disp (wr');

filename = 'coeff.coe';

fid = fopen(filename,'wt');

fclose(fid);

plz rectify the mistake in code .:cry:

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You need to write something in the file between the fopen() and fclose() function calls, or your file will be empty.