Skip to content
Snippets Groups Projects
Select Git revision
  • 44029bae231f7e6e4057f3f91dd0e9f61f6cb09a
  • main default protected
  • sumlab
  • dev/test_tobias
  • jack.rolph-main-patch-16563
  • jack.rolph-main-patch-96201
  • jack.rolph-main-patch-18340
  • jack.rolph-main-patch-15793
  • jack.rolph-main-patch-74592
  • 1.0.0
10 results

PeakOTron.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    val.py 428 B
    # To add a new cell, type '# %%'
    # To add a new markdown cell, type '# %% [markdown]'
    
    # %%
    from matplotlib import pyplot as plt
    import numpy as np
    
    
    # %%
    file = open("values.txt","r")
    
    
    # %%
    f = file.readline()
    print(f)
    niter = int(f)
    g = [0]*niter
    for i in range (0, niter):
        g[i]= file.readline()
        g[i]=float(g[i])
        
    file.close()
    print(g)
    
    
    
    # %%
    p= np.arange(1,niter+1)
    print(p)
    
    
    # %%
    plt.plot(p,g,'r-')
    
    
    # %%