About 4,170,000 results
Open links in new tab
  1. input - MathWorks

    x = input(prompt) displays the text in prompt and waits for the user to input a value and press the Return key. The user can enter expressions, like pi/4 or rand(3), and can use variables in the …

  2. Prompt user for a text string - MATLAB Answers - MATLAB Central …

    ais=input('Give me a letter you would like converted to a number: ', 's') alphabet=[ 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z' ]

  3. string, - MathWorks

    str = string(A) converts the input array to a string array. For instance, if A is numeric vector [1 20 300], str is a string array of the same size, ["1" "20" "300"].

  4. using string in if statement - MATLAB Answers - MATLAB Central

    Oct 29, 2021 · If you attempt to compare two strings using == and the strings are not the same length, then you will get errors. == can be used for strings only if they are the same length. …

  5. How to receive user input as a string data type? - MATLAB …

    Jan 30, 2019 · "input" is not a GUI function. It returns a char vector and not a string. The user cannot use the return key as a carriage return.

  6. inputdlg - MathWorks

    Users can enter scalar or vector values into inputdlg text edit fields. MATLAB ® stores the input as a cell array of character vectors. Convert a member of the input cell array to a number, …

  7. isstring - MathWorks

    Text in String and Character Arrays; Create String Arrays; Use is* Functions to Detect State

  8. how to input a string into a function? - MATLAB Answers

    Apr 27, 2017 · Judging by the function name the outputs are not required, so I removed the superfluous outputs and added newline characters to the fprintf format strings: function …

  9. How to call a variable with user string input - MATLAB Answers

    May 13, 2014 · Once you have the user's input string and have created the variable name, you can use the eval function to access that variable. eval([ 'dataset = ' ,variableName, ';' ]); the …

  10. validatestring - MathWorks

    Name of input variable to validate, specified as a string scalar or character vector. If you specify an empty character vector '' or the <missing> string, then the validatestring function ignores …