#!/usr/bin/env python
"""
Created on Fri 15 Feb 2019/Magne Guttormsen
"""
from numpy import *
from matplotlib.pyplot import *
def VS(x):
return (16*(sin(x))**5)+1
def HS(x):
return sin(5*x)-5*sin(3*x)+10*sin(x)
def Diff(x):
return (16*(sin(x))**5) - (sin(5*x)-5*sin(3*x)+10*sin(x))
#print w
n = 100
x = linspace(0, 2*pi, n )
ion()
figure()
# Plotter initialtilstand naar t = 0
lineLS, = plot( x, VS(x),'b',alpha=0.7,label='VS + 1' )
lineHS, = plot( x, HS(x),'g',alpha=0.7,label='HS' )
lineDiff, = plot( x, Diff(x),'r',alpha=0.7,label='Differanse' )
legend(loc='upper right')
xlabel('$\Theta$ (rad)') # Tekst langs x-aksen
ylabel('VS, HS og VS-HS') # Tekst langs y-aksen
xlim([ 0, 2*pi]) # Grenser x-akse
ylim([-20, 20]) # Grenser y-akse
draw()
ioff()
show()