Added Project and Report

This commit is contained in:
elvis
2024-07-30 14:43:25 +02:00
parent c828453e94
commit 3ad6f7f86f
311 changed files with 13490 additions and 3280 deletions

11
Lessons/10-04/plotQ.jl Normal file
View File

@ -0,0 +1,11 @@
using LinearAlgebra
using Plots
function plotQ(Q::Matrix, q::Vector, xyrange::Tuple{Tuple{Number, Number}, Tuple{Number, Number}})::Plots.Plot
f(x, y) = dot((1/2) * hcat(x, y) * Q, vcat(x, y)) + dot(q', vcat(x, y))
xrange = LinRange(xyrange[1][1], xyrange[2][1], 200)
yrange = LinRange(xyrange[1][2], xyrange[2][2], 200)
z = @. f(xrange', yrange)
plt = contour(xrange, yrange, z)
plt
end