error in text file.

clear all
N = 65;
B = 16; % bits
w = hamming(N);-<-------- error shows. Error in ==>( hamming at 4
w = hamming(N);)
winscaled = round(w.*(2^(B-2)/max(w)));
filename = 'window_coeff.coe';
fid = fopen(filename,'wt');
fprintf(fid,'memory_initialization_radix=16;\n');
fprintf(fid,'memory_initialization_vector=\n');
for i=1:N
fprintf(fid,'%d,\n', w(i));
end
fprintf(fid,'%d;\n', w(N));
fclose(fid);
above is my code,where i get error, plz help me to correct the code. thanks in advance.

1 Commento

Image Analyst
Image Analyst il 2 Ott 2011
Worked fine for me. No problems whatsoever.

Risposte (1)

Walter Roberson
Walter Roberson il 2 Ott 2011

0 voti

What error does it show?
Did you happen to store your script in a file hamming.m ? If so then that would lead to a problem.
If the error is about it not knowing a function named hamming, the possibly you do not have the Signal Processing toolbox installed or licensed?

Questa domanda è chiusa.

Tag

Non è stata ancora inserito alcun tag.

Richiesto:

il 2 Ott 2011

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by