diff operator_def/assemble_boundary_op.m @ 822:4808c4bd844e feature/operator_files

Add assemble_boundary_op
author Ylva Rydin <ylva.rydin@telia.com>
date Mon, 10 Sep 2018 17:16:22 +0200
parents
children ed8d34894589
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/operator_def/assemble_boundary_op.m	Mon Sep 10 17:16:22 2018 +0200
@@ -0,0 +1,9 @@
+function [op_l, op_r] = assemble_boundary_op(op,m)
+l = length(op);
+
+op_l = sparse(m,1);
+op_l(1:l) = op;
+
+op_r = sparse(m,1);
+op_r(m-l+l:m) = flipr(op);
+end