In [28]:
using Jacobi
using PyPlot
#using Gadfly
using Interact
include("../src/HPFEM.jl");
include("..HPFEM_mod.jl")


WARNING: replacing module HPFEM
Out[28]:
lagrange_spec (generic function with 5 methods)

Edo

$$ y'' + y = (1 + 4 \pi^2)sin(2 \pi x) \\ y(-1) = y(1) = 0$$


In [ ]:


In [29]:
f = figure(2)
erro = 0
@manipulate for k= 1:0.5:10, Q= 1:1:100,M=1:1:100, nel=1:1:100 ; withfig(f) do
        fun(x) = (1 + 4*(k*pi)^2)*sin(2*k*pi*x)
        resp(x) = sin(2*k*pi*x)
        if Q < M
            Q=M
        end
        subplot(211)
        erro = lagrange_oed_plot(M,Q,nel,fun,resp)
        subplot(212)
        x = linspace(-1,1,101)
        y = x
        plot(x,y)

    end
end


Out[29]:

In [ ]: