Mercurial > repos > public > sbplib
annotate +grid/old/triang_map.m @ 266:bfa130b7abf6 operator_remake
Added error message for too few grid points to all implementation files.
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Fri, 09 Sep 2016 11:03:13 +0200 |
parents | 48b6fb693025 |
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 |