Hello I am writing a code to display an impulse function, but have run into
an error which is:
'n' undefined near line 30 column 6
imp.m <http://octave.1599824.n4.nabble.com/file/t373038/imp.m>
After removing the "0" in the very beginning of the attached file "imp.m" (which might be a copy&paste mistake), I get another error:
error: stem: inconsistent sizes for X and Y
error: called from
__stem__>check_stem_arg at line 276 column 11
__stem__ at line 37 column 40
stem at line 127 column 8
imp at line 32 column 1
This error can be fixed by using equally shaped vectors with each 12 entries, e.g. you must change one line to x=ones(1,12);
Additionally, you should clean you Octave session "clear all" or even restart Octave, and run the file again if you face strange errors (maybe you accidentally created variables named like the function or whatever).
HTH,
Kai