I'm currently trying to print the following function in my plot and I'm not allowed to use any imports or other libraries:
using Plots
amplitude = 1
frequenz_E = 329.63
frequenz_G_SHARP = 415.30
frequenz_B = 493.88
k(t) = amplitude * sin * (2 * pi * frequenz_E * t)
p = plot(0:0.005:0.001, k , label="E = 329.63 Hz", title="Triade sound wave", xlabel="t (seconds)", ylabel="y(t)")
display(p)
I do want to start at 0 and then increase the value by 0.005 up to 0.01.
Now if I want to print the function, I do get the following error:
include("/home/user/Applied_Mathmatics/Assignment_01/templates/waves.jl")
ERROR: LoadError: MethodError: no method matching *(::Int64, ::typeof(sin))
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any...) at operators.jl:529
*(::ChainRulesCore.NotImplemented, ::Any) at /home/user/.julia/packages/ChainRulesCore/8NXnp/src/tangent_arithmetic.jl:37
*(::ChainRulesCore.ZeroTangent, ::Any) at /home/user/.julia/packages/ChainRulesCore/8NXnp/src/tangent_arithmetic.jl:104
How can I work around the error and just print the function?
The output should look like this (I did not implement all functions yet):
