Click here to Skip to main content
15,388,979 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Will casting / passing 16 bit int as double harm FFT processing? Pin
Richard MacCutchan28-Sep-14 4:40
mveRichard MacCutchan28-Sep-14 4:40 
GeneralRe: Will casting / passing 16 bit int as double harm FFT processing? Pin
Vaclav_28-Sep-14 6:10
MemberVaclav_28-Sep-14 6:10 
GeneralRe: Will casting / passing 16 bit int as double harm FFT processing? Pin
Richard MacCutchan28-Sep-14 6:41
mveRichard MacCutchan28-Sep-14 6:41 
GeneralRe: Will casting / passing 16 bit int as double harm FFT processing? Pin
Vaclav_28-Sep-14 8:35
MemberVaclav_28-Sep-14 8:35 
GeneralRe: Will casting / passing 16 bit int as double harm FFT processing? Pin
Richard MacCutchan28-Sep-14 21:58
mveRichard MacCutchan28-Sep-14 21:58 
GeneralRe: Will casting / passing 16 bit int as double harm FFT processing? Pin
Vaclav_29-Sep-14 4:06
MemberVaclav_29-Sep-14 4:06 
GeneralRe: Will casting / passing 16 bit int as double harm FFT processing? Pin
Richard MacCutchan29-Sep-14 5:27
mveRichard MacCutchan29-Sep-14 5:27 
AnswerRe: Will casting / passing 16 bit int as double harm FFT processing? Pin
Albert Holguin29-Sep-14 9:36
professionalAlbert Holguin29-Sep-14 9:36 
Vaclav_Sal wrote:
one collecting 10 bits of data into 16 bits integer array

This is common for transferring along byte boundaries. If you transmit 10bits, how many bytes are you moving across a network? ...yeah, integer numbers are desirable for network operations. Pretty much all receivers/digitizers do this.

Vaclav_Sal wrote:
if I cast or build a new variable as double it will take an 16 bit integer and
process it as double, than what will happen to the original array ?

When casting, nothing happens to your original data, a copy is made. Although as Richard already mentioned, you can't simply cast a whole array, since your element spacing will be different (16bit vs 32bit array elements).

Vaclav_Sal wrote:
I am still learning about FFT , but as far as I can tell the first FFT function
puts new data (normal pointer behavior)   into the original (integer )
array as what ? Integer?

Output of most FFT routines is a float or double (depending on whether it's "single" or "double" precision math).


Vaclav_Sal wrote:
I think the   only way is to collect the ADC data into double array
from get go.

Not going to happen. Analog to digital converters (and most hardware for that matter) deal with integers (you'll commonly hear the term fixed point math, that's why).
GeneralSOLVED Will casting / passing 16 bit int as double harm FFT processing? YES Pin
Vaclav_29-Sep-14 17:13
MemberVaclav_29-Sep-14 17:13 
QuestionConverting a string to a double Pin
Richard Andrew x6426-Sep-14 20:53
professionalRichard Andrew x6426-Sep-14 20:53 
AnswerRe: Converting a string to a double Pin
Richard MacCutchan26-Sep-14 21:35
mveRichard MacCutchan26-Sep-14 21:35 
AnswerRe: Converting a string to a double Pin
Jochen Arndt26-Sep-14 21:41
professionalJochen Arndt26-Sep-14 21:41 
QuestionSigned integers considered harmful? Pin
harold aptroot26-Sep-14 8:38
Memberharold aptroot26-Sep-14 8:38 
AnswerRe: Signed integers considered harmful? Pin
Chris Losinger26-Sep-14 8:46
professionalChris Losinger26-Sep-14 8:46 
GeneralRe: Signed integers considered harmful? Pin
PIEBALDconsult26-Sep-14 9:02
professionalPIEBALDconsult26-Sep-14 9:02 
AnswerRe: Signed integers considered harmful? Pin
Richard Andrew x6426-Sep-14 9:02
professionalRichard Andrew x6426-Sep-14 9:02 
GeneralRe: Signed integers considered harmful? Pin
harold aptroot26-Sep-14 10:15
Memberharold aptroot26-Sep-14 10:15 
AnswerRe: Signed integers considered harmful? Pin
jeron126-Sep-14 9:17
Memberjeron126-Sep-14 9:17 
GeneralRe: Signed integers considered harmful? Pin
Chris Losinger26-Sep-14 9:22
professionalChris Losinger26-Sep-14 9:22 
GeneralRe: Signed integers considered harmful? Pin
jeron126-Sep-14 9:25
Memberjeron126-Sep-14 9:25 
GeneralRe: Signed integers considered harmful? Pin
Richard Andrew x6426-Sep-14 9:34
professionalRichard Andrew x6426-Sep-14 9:34 
GeneralRe: Signed integers considered harmful? Pin
PIEBALDconsult26-Sep-14 9:45
professionalPIEBALDconsult26-Sep-14 9:45 
GeneralRe: Signed integers considered harmful? Pin
harold aptroot26-Sep-14 10:05
Memberharold aptroot26-Sep-14 10:05 
AnswerRe: Signed integers considered harmful? Pin
Richard MacCutchan26-Sep-14 10:14
mveRichard MacCutchan26-Sep-14 10:14 
GeneralRe: Signed integers considered harmful? Pin
harold aptroot26-Sep-14 10:19
Memberharold aptroot26-Sep-14 10:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.