Mercurial > repos > public > sbplib
annotate +grid/old/triang_map.m @ 0:48b6fb693025
Initial commit.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 17 Sep 2015 10:12:50 +0200 |
parents | |
children |
rev | line source |
---|---|
0 | 1 % Creates a grid [X,Y] from the mapping function S at points in vectors u,v |
2 function [X, Y] = traing_map(S,u,v) | |
3 error('not done') | |
4 if nargin == 2 | |
5 v = u; | |
6 end | |
7 | |
8 if isscalar(u) | |
9 u = linspace(0,1,u); | |
10 end | |
11 | |
12 if isscalar(v) | |
13 v = linspace(0,1,v); | |
14 end | |
15 | |
16 nu = length(u); | |
17 nv = length(v); | |
18 | |
19 X = zeros(nu,nv); | |
20 Y = zeros(nu,nv); | |
21 | |
22 for i = 1:nu | |
23 for j = 1:nv | |
24 [x,y] = S(u(i),v(j)); | |
25 X(i,j) = x; | |
26 Y(i,j) = y; | |
27 end | |
28 end | |
29 end |