Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

EXPND_BY_LEN and EXPND_BY_LEN_STR

Appendix A.

EXPND_BY_LEN and EXPND_BY_LEN_STR

 
 

EXPND_BY_LEN(var, len, nx) Returns a variable expanded by the lengths given in argument 2

Arguments:

VAR

1D variable to expand

 

LEN

lengths to expand each element of argument 1

 

nx

length of result (sum of lengths in arg 2)

Result Axes:

X

ABSTRACT, length given by arg 3

 

Y

Inherited from DAT

 

Z

Inherited from DAT

 

T

Inherited from DAT

 

E

Inherited from DAT

 

F

Inherited from DAT

 

EXPND_BY_LEN_STR (var, len, nx) Returns a string variable expanded by the lengths given in argument 2

The first argument VAR is a string. LEN and NX are numeric.

Example:

 

 

yes? let var = {8,-2,3}
yes? let lens = {3,4,2}
 
yes? list expnd_by_len(var,lens, `lens[i=@sum]`) !-> list expnd_by_len(var,lens, 9)
VARIABLE : EXPND_BY_LEN(VAR,LENS, 9)
SUBSET : 9 points (X)
1 / 1: 8.000
2 / 2: 8.000
3 / 3: 8.000
4 / 4: -2.000
5 / 5: -2.000
6 / 6: -2.000
7 / 7: -2.000
8 / 8: 3.000
9 / 9: 3.000