Mercurial > repos > public > sbplib
comparison +parametrization/old/triang_map.m @ 886:8894e9c49e40 feature/timesteppers
Merge with default for latest changes
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 15 Nov 2018 16:36:21 -0800 |
parents | 3a3cf386bb7e |
children |
comparison
equal
deleted
inserted
replaced
816:b5e5b195da1e | 886:8894e9c49e40 |
---|---|
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 |