# Unreasonable error from Fourier

Posted 10 years ago
2974 Views
|
1 Reply
|
0 Total Likes
|
 Hi, here is the command I typed. a = Fourier[{{ConstantArray[1, {4, 1}]}, {ConstantArray[     0, {12, 1}]}, {ConstantArray[1, {4, 1}]}}]and get this errorFourier::fftl: Argument {{{{1},{1},{1},{1}}},{{{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}}},{{{1},{1},{1},{1}}}} is not a non-empty list or rectangular array of numeric quantities.is there anyway out of this? The documentation does not give a clue.
1 Reply
Sort By:
Posted 10 years ago
 What are you actually trying to compute the Fourier transform of?  The argument of Fourier must be a rectangular array (a matrix) or a list of numeric quantities.  The argument that you supplied to Fourier is neither of these.  Do you want your argument to be a simple list of 1s and 0s?  If that is the case then you must Flatten the argument as inFourier[Flatten[{{ConstantArray[1, {4, 1}]}, {ConstantArray[0, {12, 1}]}, {ConstantArray[1, {4, 1}]}}]]The error messages are (often) quite informative, so read and reflect on them and look the examples over to get a sense of what may have gone wrong.  In your case you would get a quick sense of what's going wrong by examining the argument that you supplied to Fourier as in MatrixForm[{{ConstantArray[1, {4, 1}]}, {ConstantArray[    0, {12, 1}]}, {ConstantArray[1, {4, 1}]}}]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments