getColumns

Below is a demonstration of the features of the getColumns function

Contents

clear; close all; clc;

Syntax

[varargout]=getColumns(V);

Description

This function simply outputs each colum in V as a seperate vector. For instance if V represents 3 colums of data e.g. X, Y and Z coordinates then one could use [X,Y,Z]=getColumns(V);

Examples

%Example array
V=rand(5,3)

%Using |getColumns| to obtain the columns:
[X,Y,Z]=getColumns(V)
V =

   0.775712678608402   0.508508655381127   0.378609382660268
   0.486791632403172   0.510771564172110   0.811580458282477
   0.435858588580919   0.817627708322262   0.532825588799455
   0.446783749429806   0.794831416883453   0.350727103576883
   0.306349472016557   0.644318130193692   0.939001561999887


X =

   0.775712678608402
   0.486791632403172
   0.435858588580919
   0.446783749429806
   0.306349472016557


Y =

   0.508508655381127
   0.510771564172110
   0.817627708322262
   0.794831416883453
   0.644318130193692


Z =

   0.378609382660268
   0.811580458282477
   0.532825588799455
   0.350727103576883
   0.939001561999887

GIBBON www.gibboncode.org

Kevin Mattheus Moerman, [email protected]

GIBBON footer text

License: https://github.com/gibbonCode/GIBBON/blob/master/LICENSE

GIBBON: The Geometry and Image-based Bioengineering add-On. A toolbox for image segmentation, image-based modeling, meshing, and finite element analysis.

Copyright (C) 2006-2023 Kevin Mattheus Moerman and the GIBBON contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.