Strcat function - concatenation, MATLAB in Mathematics

Strcat function - Concatenation:

The strcat function, though, will eliminate the trailing blanks from strings before concatenating. Note that in these illustrations, the trailing blanks from str1 are eliminated, while the leading blanks from str2 are not:

>> strcat(str1,str2)

ans =

xxx   yyy

>> length(ans)

ans =

9

>> strcat(str2,str1)

ans =

   yyyxxx

>> length(ans)

ans =

9

Posted Date: 10/20/2012 5:05:12 AM | Location : United States







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

Write discussion on Strcat function - concatenation
Your posts are moderated
Related Questions
Pie chart - plot functions: The MATLAB also has a function pie which will generate a pie chart. Calling the function with the form pie (vec) draws a pie chart, by using the pe

Blanks function: The blanks function will generate a string consisting of n blank characters-that are kind of hard to see here! Though, in a MATLAB if the mouse is moved to hi

Error-checking for integers: illustrations of running this script as shown below: >> readoneint Enter an integer: 9.5 Invalid! Enter an integer: 3.6 Invalid

Applications of Customized Strings: Labels, Prompts, Arguments to Functions: The one of very useful application of this is to involve numbers in strings that are used to plot

Plot types: Besides plot and bar, there are another plot types like stem plots, histograms, stem plots, area plots and pie charts, and also other functions which customize the

Complex numbers: A complex number is commonly written in the form z = a + bi here a is known as the real part of the number z, b be the imaginary part of z, and i is √-1

User input in the while loop: Here is an illustration of running this script: >> readonenum Enter a positive number: -5 Invalid! Enter a positive number: -2.2

sprintf function: The sprintf function works precisely like the fprintf function, but rather than printing it generates a string. Here are some illustrations in which the outp

Symbolic Expression The solve function solves an equation and returns the solution(s) as symbolic expressions. The answer can be converted to numbers by using any numeric funct

Illustration of a recursive function: illustration is of a recursive function which does not return anything, but simply prints. The below function prtwords receives a sentenc