Deblank function, MATLAB in Engineering

deblank function:

The deblank function eliminates only trailing blanks from the string, not leading the blanks. The strtrim function will eliminate both the leading and trailing blanks from a string, but not blanks in a middle of the string. In the illustration below, the three blanks in the starting and four blanks in the end are eliminated, but not the two blanks in the middle. Choosing the result in MATLAB with the mouse would show the blank spaces.

 >> strvar = [blanks(3) 'xx' blanks(2) 'yy' blanks(4)]

strvar =

   xx  yy

>> length(strvar)

ans =

13

>> strtrim(strvar)

ans =

xx  yy

>> length(ans)

ans =

6

Posted Date: 10/20/2012 5:25:15 AM | Location : United States







Related Discussions:- Deblank function, Assignment Help, Ask Question on Deblank function, Get Answer, Expert's Help, Deblank function Discussions

Write discussion on Deblank function
Your posts are moderated
Related Questions
IS Functions for Strings: There are many functions for strings, that return logical true or false. The function isletter returns the logical true when the character is a lette

Defined a variable in work space: The variables defined in the script will become a part of the workspace: >> clear >> who >> mysummfile    15 >> who

Built-in colormaps: The MATLAB has numerous built-in colormaps which are named; the reference page on colormap shows them. Calling the function colormap without passing any ar

Set Operations: The MATLAB has numerous built-in functions which perform set operations on vectors. These involve intersect, union, setdiff, unique, and setxor. All these func

Text graphic function - Graphics objects: The text graphic function permits text to be printed in a Figure Window, involving special characters which are printed by using \spe

Illustration of Variable scope: Running this function does not add any of variables to the workspace, as elaborated: >> clear >> who >> disp(mysum([5 9 1]))

Binary Search: The binary search supposes that the vector has been sorted first. The algorithm is just similar to the way it works whenever looking for a name in a phone direc

ischar function: The ischar function return the logical true if an array is a character array, or logical false if not. >> vec = 'EK127'; >> ischar(vec) ans =

Matrix solutions to systems of the linear algebraic equations: The linear algebraic equation is an equation of the form a 1 x 1 + a 2 x 2 + a 3 x 3    .  .  .  .  a n x n

I have a frequency response data. How do I convert that to state space? I am given a 6 row and 3 column data (steady state). How do i convert that to state space model?