No BSD License
-
deg2rad(deg)
-
fractions(A, B, C)
FRACTIONS normalise ternary data
-
simpletri(N);
SIMPLETRI return simple triangulation for square datasets
-
ternaxes(majors)
TERNAXES create ternary axis
-
terncontour(A, B, C, Z, I)
TERNCONTOUR plot contours on ternary phase diagram
-
terncoords(fA, fB, fC)
TERNCOORDS calculate rectangular coordinates of fractions on a ternary plot
-
ternlabel(A, B, C)
TERNLABEL label ternary phase diagram
-
ternpcolor(varargin)
TERNPCOLOR plot pseudo color diagram on ternary axes
-
ternplot(A, B, C, varargin)
TERNPLOT plot ternary phase diagram
-
ternsurf(A, B, C, Z)
TERNSURF plot surface diagram for ternary phase diagram
-
vertexlabel(A, B, C, offset)
VERTEXLABEL label ternary phase diagram at vertices
-
terndemo.m
-
View all files
from
Ternplot
by Carl Sandrock
Plots ternary phase data on a ternary phase diagram.
|
| simpletri(N);
|
% SIMPLETRI return simple triangulation for square datasets
% TRI = SIMPLETRI(N) returns a matrix containing indexes to the
% vertices of triangles fitted onto a square grid of size NxN.
%
% See also TERNSURF
% Method:
% Author Carl Sandrock 20031006
% To do
% Modifications
% Modifiers
% (CS) Carl Sandrock
function tri = simpletri(N);
% for each square, divide diagonally from top left to bottom right
% The two triangles have their top left and bottom right points in common,
% with the remaining point being either top right or bottom left
%
% tl--tr
% |\ |
% | \|
% bl--br
%
% Remember that increasing i goes with increasing x, so from bottom to top
[row, col] = meshgrid(1:N-1);
bl = sub2ind([N, N], row, col);
bl = bl(:);
br = bl + 1;
tl = bl + N;
tr = tl + 1;
tri = [tl bl br; tl tr br];
|
|
Contact us at files@mathworks.com