Mercurial > repos > public > sbplib
changeset 361:4a5d83324ec1 feature/hypsyst
Meged with default
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Thu, 08 Dec 2016 13:38:04 +0100 |
parents | 9567a9dd220d (current diff) 5cb99f56f55e (diff) |
children | 7ada2db63268 |
files | |
diffstat | 4 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/+grid/place_label.m Thu Dec 08 10:52:15 2016 +0100 +++ b/+grid/place_label.m Thu Dec 08 13:38:04 2016 +0100 @@ -1,3 +1,5 @@ +% 'left' | 'center' | 'right' +% 'baseline' | 'top' | 'cap' | 'middle' | 'bottom' function place_label(pt,str,horzAl,vertAl) default_arg('horzAl','center'); default_arg('vertAl', 'middle');
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spyh.m Thu Dec 08 13:38:04 2016 +0100 @@ -0,0 +1,16 @@ +% spyh mimics the built in spy but returns a handle which allows modifying the plot. +function h = spyh(A) + [n,m] = size(A); + [I,J] = find(A); + + h = plot(J,I); + h.LineStyle = 'none'; + h.Marker = '.'; + h.MarkerSize = 14; + + a = gca; + xlim([0 m+1]); + ylim([0 n+1]); + axis square + a.YDir = 'reverse'; +end \ No newline at end of file
--- a/stripeMatrix.m Thu Dec 08 10:52:15 2016 +0100 +++ b/stripeMatrix.m Thu Dec 08 13:38:04 2016 +0100 @@ -1,4 +1,5 @@ % Creates a matrix of size n,m with the values of val on the diagonals diag. +% A = stripeMatrix(val,diags,n,m) function A = stripeMatrix(val,diags,n,m) default_arg('m',n);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/timeTask.m Thu Dec 08 13:38:04 2016 +0100 @@ -0,0 +1,9 @@ +function done = timeTask(taskName) + fprintf('%s', taskName); + tStart = tic; + + function done_fun() + fprintf(' - done %fs\n', toc(tStart)); + end + done = @done_fun; +end \ No newline at end of file