vector to string 1.0
File ID: 90052
vector to string 1.0 Description
Description: This is a small M-file that can be thought of as the inverse of the colon operator: it takes a linearly spaced row vector and generates a compact notation for that vector.
It handles concatenations of such vectors too, and will in fact for any real array (subject to considerations of numerical precision) generate a valid string representation of that array as a reshaped row vector.
I wrote this because I found myself using input dialog boxes in a GUI, where a numeric vector is entered as a string to be parsed by str2num, and I wanted to provide the current value of the vector as the default answer. mat2str already does this, but the result is unwieldy for all but the smallest arrays, so that was not really useful in this context.
Related: Numeric, entered, parsed, wanted, str num, Boxes, Dialog, Found, Input, provide, current, arrays, smallest, Context
O/S:BSD, Linux, Solaris, Mac OS X
File Size: 10.0 KB
|More Similar Code|
This Mfile offers a fast conversion of a date vector to a string, where the date/time given in the string is controlled by a token.
1. ISO 8601 date/time/timestamp extended format:
- Returns one of two date formats:
<year />-<month />-<date />T<hour />:<min />:<sec />
<year />-W<week />-<day />T<hour />:<min />:<sec />
- The token can be...
Binary vector To Decimal vector
Decimal vector To Binary vector
Helpful mfile (exemples:how to use m functions).
This vector class stores elements in a list and hence allows the 'vector' to grow
dynamically. Common mathematical functions (sin, cosh, etc) are supported elementwise
and so are a number of 'external' operations (dot for the inner...
Convert a specified Julian Date Vector to Greenwich Mean Sidereal Time (GMST). The expected input matrix may contain multiple dimensions. The output matrix will be in the same size as the input matrix. Warning: Use caution when using GMST as a...
function [h1, h2] = plot_dir3 (vX, vY, vZ)
Plotting x-y-z variables with direction indicating vector to the next element.
vX = linspace(0,2*pi, 10)';
vY = sin (vX);
vZ = cos (vX);
plot_dir3(vX, vY, vZ);
This demonstration illustrates the use of a complex space vector to represent a three-phase signal . It also shows the transformation of the 3-phase signal 'ABC' into an equivalent 2-phase system 'alpha_beta'. The only restriction to the 3-phase...
Convert a specified Julian Date Vector to Greenwich Apparent Sidereal Time (GAST). The expected input matrix may contain multiple dimensions. The output matrix will be in the same size as the input matrix. Warning: Use caution when using GAST as a...
Round the elements of a numeric input vector to the nearest "preferred number" values.
Why This Function?
Many parts and components in engineering and electronics are defined by "preferred value" or...
Small project providing conversions from Object to String and vice versa in Java. Uniquely, it can use annotations @ToString and @FromString to identify methods to use.
This eclipse plug-in will allow the users to convert there string values to string which contains Unicode value for Non-ASCII characters. This is useful when working with java resource bundles.
|User Review for vector to string