Importing Tensor Data

How to import Tensor Data

On this page ...
Importing Tensor data using the import wizard
The generic interface

Importing Tensor data using the import wizard

The most simplest way to load Tensor data is to use the import wizard, which can be started either by typing into the command line

import_wizard('tensor');

The generic interface

The most comfortable way to import a tensor is by using the command tensorName.load

fname = fullfile(mtexDataPath,'tensor','Olivine1997PC.GPa');

cs = crystalSymmetry('mmm',[4.7646 10.2296 5.9942],'mineral','Olivin');

C = stiffnessTensor.load(fname,cs)
 
C = stiffnessTensor  
  unit   : GPa              
  rank   : 4 (3 x 3 x 3 x 3)
  mineral: Olivin (mmm)     
 
  tensor in Voigt matrix representation:
 320.5  68.2  71.6     0     0     0
  68.2 196.5  76.8     0     0     0
  71.6  76.8 233.5     0     0     0
     0     0     0    64     0     0
     0     0     0     0    77     0
     0     0     0     0     0  78.7