Solved

Fourier Analysis Excel 2007 array size error

Posted on 2011-03-10
11
1,080 Views
Last Modified: 2012-05-11
This is Excel 2007.  I did a Fourier Analysis over an array of 512 real numbers yielding an array of 512 complex numbers.
Then I tried to do a 2nd array of the same size.
The function errors out saying that the arrays need to be sized a power of 2.  512 is a power of two.
The exact row numbers are x3:x514.
514 -3 +1 is 512 rows of course......
Please help!
0
Comment
Question by:Fred Marshall
  • 7
  • 4
11 Comments
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35104566
512 is a valid size as it is a power of two. Can I see the code that you are using?

Sid
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35104803
Also I want to see how are you populating the 2nd array? You might want to try this to check if it is actually a 512 sized array?

'~~> Replace MyArray with the name of the array
Debug.Print Ubound(MyArray)

Open in new window


Sid
0
 
LVL 25

Author Comment

by:Fred Marshall
ID: 35104963
I didn't do anything re: arrays really.

I just used the Fourier Analysis Input Range and Output Range pretty much like I said originally.

$E$3:$E$514
$H$3:$H$514

Just for the heck of it I did this:
I ran it over 256 cells and got the results.
Then I repeated those cells to get 256
Then I did an Inverse over the 512 and it worked fine.

The Inverse values are purely real as expected.
But, when I try to format them down to 1 or 2 decimal places they don't change at all!

I don't know how to do the Debug.Print Unbound thing......
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35104972
I used the same range and didn't get an error?

Sid
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35104975
BTW when I say Error I am referring to your main array size error.

Sid
0
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 500 total points
ID: 35105235
>>>The Inverse values are purely real as expected.
But, when I try to format them down to 1 or 2 decimal places they don't change at all!

I see what you mean...

That is because the numbers are stored as text. See snapshot 1. If you convert them to number then you will get the desired results. (See snapshot 2)

Sid


Untitled.jpg
Untitled2.jpg
0
 
LVL 25

Author Comment

by:Fred Marshall
ID: 35105948
Now it says that all the complex numbers have to have the same suffix either "i" or "j" but they were generated by Excel!!

I don't get the error you show to work on...
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35105960
Can you upload your file?

Sid
0
 
LVL 25

Author Comment

by:Fred Marshall
ID: 35106019
I did find an error.  One of the input arrays had some blank cells in it.  Seems to be working better now.
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35106120
Gr8 :)

Sid
0
 
LVL 25

Author Closing Comment

by:Fred Marshall
ID: 35108587
I likely would not have noticed this little pastel icon/button nor known what to do with it.  It helped quite a bit in fixing this problem!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linking tables - expand results 5 31
Finding a closest match in Excel 7 35
If Statement 3 19
Excel VBA - macro in one workbook with another open 4 19
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now