About 869,000 results
Open links in new tab
  1. 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.

  2. Characters and Strings - MathWorks

    MATLAB provides several functions to search for, replace, or extract text in string arrays and character vectors. MATLAB stores all characters as Unicode characters. Both strings and character vectors use the same encoding. You can convert characters to their Unicode code values, and numbers to characters.

  3. strfind - MathWorks

    k = strfind(str,pat) searches str for occurrences of pat. The output, k, indicates the starting index of each occurrence of pat in str. If pat is not found, then strfind returns an empty array, []. The strfind function executes a case-sensitive search.

  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. Appending string to Matlab array - Stack Overflow

    Aug 29, 2013 · How do I append a string to a Matlab array column wise? filename = 'string'; name=[name; filename] You need to use cell arrays. If the number of iterations are known beforehand, I suggest you preallocate: names{i} = 'string'; otherwise you can do something like: names{end+1} = 'string';

  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. Array of Strings in Matlab: A Quick Guide

    Discover how to create and manipulate an array of strings in matlab effortlessly. This guide breaks down essential commands for quick mastery. In MATLAB, an array of strings can be created using a string array which allows for efficient storage and manipulation of text data, as shown in the following example: What is a String Array?

  8. MATLAB Strings - Online Tutorials Library

    Explore the MATLAB Strings section and learn how to manipulate strings effectively in MATLAB programming. Enhance your coding skills with practical examples. Master string manipulation in MATLAB with our comprehensive guide.

  9. Create String Arrays - MathWorks

    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.

  10. Handling Strings like a Pro: A MATLAB Guide – TheLinuxCode

    Dec 27, 2023 · Strings are invaluable in MATLAB programming. Whether gathering user inputs or importing external data, text handling unlocks custom analyses. However, strings also introduce fresh challenges: unchecked user inputs, misparsed data, or plain old syntax headaches.

Refresh