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

Illustration of Subfunctions: This is an illustration of running this program: >> rectarea Please enter the length: 6 Please enter the width: 3 For a rectan

Implementation of binary search: The binary search can be implemented as a recursive function. The recursive function below also implements this binary search algorithm. It re

Example of file ploting data: As the other example, a data file called 'compsales.dat' stores the sales figures (in millions) for divisions in a company. Each line in the f

calcrectarea subfunction: function call: area = calcrectarea(len,wid); function header: function area = calcrectarea(len, wid)   In the function call, the two arg

Illustration of Set operations: For illustration, given the vectors as shown below: >> v1 = 2:6 v1 = 2  3  4  5  6 >> v2 = 1:2:7 v2 = 1  3  5  7

Inverse of square matrix: The inverse is, hence the result of multiplying the scalar 1/D by each and every element in the preceding matrix. Note that this is not the matrix A,

Removing Whitespace Characters: The MATLAB has functions which will eliminate trailing blanks from the end of a string and/or leading blanks from the starting of a string.

Finding sums and products: A very general application of a for loop is to compute sums and products. For illustration, rather than of just printing the integers 1 through 5, w

i want to run 4 instances of my matlab code on 4 processor cores. im executing the job from head node. i created a parallel job and assigned number of workers. but i don''t get bac