Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Savitzky-Golay Filter
#4
code failed to read & extract infos from text file correctly thats all

assume frequency and amplitude is 1st & 2nd column respectively in data.txt. try replace line 18 to 23 with
filz=open(directory,'r')
while True:
    text = filz.readline()
    if text == '':
        break
    text = text.split()
    frequency.append(text[0])
    amplitude.append(text[1])
filz.close()
best avoid using python built-in func/keywords( 'file' in this case) as variable name. so i named it filz.
swallow osama bin laden
Reply


Messages In This Thread
Savitzky-Golay Filter - by muhsin - Mar-01-2018, 05:41 PM
RE: Savitzky-Golay Filter - by ka06059 - Mar-02-2018, 02:04 AM
RE: Savitzky-Golay Filter - by muhsin - Mar-02-2018, 02:10 AM
RE: Savitzky-Golay Filter - by ka06059 - Mar-02-2018, 11:15 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020