About 17,300,000 results
Open links in new tab
  1. Characters and Strings - MathWorks

    String arrays provide a set of functions for working with text as data. You can create strings using double quotes, such as str. = "Greetings friend". To convert data to string arrays, use the string function. For more information, see Text in String and Character Arrays or watch Using String Arrays for Text Data.

  2. Create String Arrays - MathWorks

    Create String Arrays from Variables. MATLAB® provides string arrays to store pieces of text. Each element of a string array contains a 1-by-n sequence of characters. You can create a string using double quotes.

  3. fprintf - MathWorks

    fprintf(fileID,formatSpec,A1,...,An) applies the formatSpec to all elements of arrays A1,...An in column order, and writes the data to a text file. fprintf uses the encoding scheme specified in the call to fopen .

  4. How do I put variable values into a text string in MATLAB?

    Oct 1, 2012 · As Peter and Amro illustrate, you have to convert numeric values to formatted strings first in order to display them or concatenate them with other character strings. You can do this using the functions FPRINTF, SPRINTF, NUM2STR, and INT2STR.

  5. MATLAB Strings - Online Tutorials Library

    MATLAB Strings - Explore the MATLAB Strings section and learn how to manipulate strings effectively in MATLAB programming. Enhance your coding skills with practical examples.

  6. Characters and Strings in MATLAB - GeeksforGeeks

    Mar 15, 2022 · In this article, we shall see how to deal with characters and Strings in MATLAB. A data type is an attribute/keyword that specifies the type of data that the object can hold: numeric data or text data. By default, MATLAB stores all numeric …

  7. MATLAB String ( String access, write...Char Command)

    Jul 26, 2018 · How to write the string in MATLAB? A string writes inside a pair of the single quotation mark. The statement in MATLAB is given by. statement x(1) gives output p describe the first character of string (i.e. programming) is associated with index number 1.

  8. printing - How to print a string in Matlab? - Stack Overflow

    Feb 25, 2014 · I do this to output the contents of a string (and nothing more): fprintf( '%s', my_str ); but it feels like I've missed a function that takes only my_str as an argument.

  9. string, - MathWorks

    You can represent text in MATLAB ® using string arrays where each element of a string array stores a sequence of characters. The sequences can have different lengths without padding, such as "yes" and "no". A string array that has only one element is also called a string scalar.

  10. Write Data to Text Files in MATLAB - GeeksforGeeks

    Jul 4, 2022 · Writing data to a text file means creating a file with data that will be saved on a computer’s secondary memory such as a hard disk, CD-ROM, network drive, etc. fprintf() function is used to write data to a text file in MATLAB. It writes formatted text to a file exactly as specified.

  11. Some results have been removed
Refresh