From 4ecdd157fa182aa0221cb32d2e438e6f860e2f86 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 25 Oct 2016 12:56:17 +0200 Subject: [PATCH] [BV] Added solution to first assignment Signed-off-by: Jim Martens --- bv/uebung1.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bv/uebung1.m diff --git a/bv/uebung1.m b/bv/uebung1.m new file mode 100644 index 0000000..4966310 --- /dev/null +++ b/bv/uebung1.m @@ -0,0 +1,15 @@ +% 1. +M = [1 2; 3 4; 5 6]; +M = [M(1, 1:2) M(3, 1:2) M(2, 1:2)]; + +% 2. +lowerBound = 0; +upperBound = 10; +M2 = (upperBound-lowerBound).*rand(10, 10) + lowerBound; +M2(1, 1:end) = 1; +M2(1:end, 1) = 1; + +% 3. +rowVector = zeros(1, 200); +rowVector(1:4) = [8 6 4 2]; +rowVector(end) = 10; \ No newline at end of file