Blanks function, MATLAB in Mathematics

Assignment Help:

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 highlight the answer in ans, the blanks can be seen.

>> blanks(4)

ans =

>> length(ans)

ans =

4

 

Generally this function is most helpful when concatenating strings and you want a number of blank spaces in between. For illustration, this will insert five blank spaces in between the words:

 

>> [first blanks(5) last]

ans =

Bird     house

 

Showing the transpose of the blanks function can also be used to move the cursor down. In the Command Window, it would appear like this:

>> disp(blanks(4)')

>> 

This is helpful in a script or function to generate space in output, and is basically equivalent to printing the newline character four times.


Related Discussions:- Blanks function

Script a MATLAB program, Script a MATLAB program which meets the following ...

Script a MATLAB program which meets the following speci cations: The program expects an input of a two-variable real-valued continuous function f : R^2--> R The program is to cal

Bar and barh functions - plot functions, bar and barh functions: For a...

bar and barh functions: For a matrix, the bar and barh functions will group altogether the values in each and every row. The illustration is as shown: rm = randint(2,4,[1

Writing to files, Writing to Files: There are many lower level functio...

Writing to Files: There are many lower level functions which can write to files. We will focus on the fprintf function that can be used to write a file and also to append to a

Customizing plots, Customizing Plots : There are numerous ways to custo...

Customizing Plots : There are numerous ways to customize figures in the Figure Window. On clicking the Plot Tools icon will bring up the Property Editor & Plot Browser, with ma

Pie chart - plot functions, Pie chart - plot functions: The MATLAB als...

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

Built-in functions for complex numbers, Built-in functions for Complex numb...

Built-in functions for Complex numbers:   We know that in MATLAB both i and j are built-in functions which return √-1 (therefore, they can be thought of as built-in constants).

Applications of customized strings, Applications of Customized Strings: Lab...

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

Example of symbolic expression, Example of Symbolic Expression When the...

Example of Symbolic Expression When there is more than one variable, the MATLAB selects which to solve for. In the illustration below, the equation ax 2 + bx = 0 is solved. Th

Concatenation, Concatenation: The String concatenation means to join t...

Concatenation: The String concatenation means to join the strings altogether. Of course, as strings are merely vectors of the characters, the technique of concatenating vector

Creating string variables, Creating string Variables: The string consi...

Creating string Variables: The string consists of a few numbers of characters (including, possibly, none). These are the illustrations of the strings: '' 'x' 'ca

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd