changeset 494:c6d03f951a7f feature/quantumTriangles

Meged with default
author Ylva Rydin <ylva.rydin@telia.com>
date Thu, 23 Feb 2017 09:32:30 +0100
parents 6b8297f66c91 (current diff) 51d818bc8915 (diff)
children b91d23271481
files
diffstat 2 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
diff -r 6b8297f66c91 -r c6d03f951a7f +sbp/+implementations/d1_gauss_4.m
--- a/+sbp/+implementations/d1_gauss_4.m	Thu Feb 23 09:31:56 2017 +0100
+++ b/+sbp/+implementations/d1_gauss_4.m	Thu Feb 23 09:32:30 2017 +0100
@@ -1,10 +1,7 @@
 function [D1,H,x,h,e_l,e_r] = d1_gauss_4(L)
 
 % L: Domain length
-% N: Number of grid points
-if(nargin < 2)
-    L = 1;
-end
+default_arg('L',1);
 
 N = 4;
 
diff -r 6b8297f66c91 -r c6d03f951a7f Color.m
--- a/Color.m	Thu Feb 23 09:31:56 2017 +0100
+++ b/Color.m	Thu Feb 23 09:32:30 2017 +0100
@@ -9,6 +9,7 @@
         darkred   = [0.635 0.078 0.184];
         black     = [0.000 0.000 0.000];
         white     = [1.000 1.000 1.000];
+        colors = { Color.blue, Color.red, Color.yellow, Color.green, Color.purple, Color.lightblue, Color.darkred, Color.black, Color.white};
     end
 
     methods(Static)
@@ -16,7 +17,6 @@
             markers ={'+', 'o', '*', '.', 'x', 'square', 'diamond', 'v', '^', '>', '<', 'pentagram', 'hexagram'};
             % Filled and non-filled markers?
             lineStyles = {'-', '--', ':', '-.'};
-            colors = { Color.blue, Color.red, Color.yellow, Color.purple, Color.green, Color.lightblue, Color.darkred, Color.black, Color.white};
 
 
             function showMarkers(x0, y0, lx, ly, color, filled)
@@ -41,7 +41,7 @@
             end
 
             function showColors(x0, y0, lx, ly)
-                n = length(colors);
+                n = length(Color.colors);
                 s = ceil(sqrt(n));
 
                 x = linspace(x0, x0 + lx, s);
@@ -52,8 +52,8 @@
                 for i = 1:n
                     lh = line(X(i),Y(i));
                     lh.Marker = 'o';
-                    lh.MarkerFaceColor = colors{i};
-                    lh.Color = colors{i};
+                    lh.MarkerFaceColor = Color.colors{i};
+                    lh.Color = Color.colors{i};
                     lh.MarkerSize = 12;
                 end
             end