You can do it with eval but you really should not
eval(['x', num2str(i), ' = ', num2str(i)]); %//Not recommended
Rather use a cell array:
x{i} = i
More Related Contents:
- How to trim whitespace from a Bash variable?
- Create multiple numbered variables based on a int
- How to search for a string in cell array in MATLAB?
- How do I put a variable’s value inside a string?
- PHP – concatenate or directly insert variables in string
- Why does my string not match when reading user input from stdin?
- Extract substring in Bash
- Is there a function to split a string in PL/SQL?
- Sqlite convert string to date
- Call functions with special prefix/suffix
- dollar sign in variable name?
- Dollar ($) sign in password string treated as variable
- how to convert csv to table in oracle
- How to efficiently concatenate strings in go
- Convert Variable Name to String?
- pass character strings to ggplot2 within a function
- swift How to remove optional String Character
- String compare in Perl with “eq” vs “==” [duplicate]
- Setting variables with exec inside a function
- How to generate all the permutations of a multiset?
- Extract part of a string using bash/cut/split
- Insert a character at a specific location in a string
- Convert R vector to string vector of 1 element [duplicate]
- How do you write multiline strings in Go?
- Algorithm to find articles with similar text
- How to parse string to date in xslt 2.0
- Convert slice of string to slice of pointer to string
- Swift – Split string over multiple lines
- Groovy String to Date
- What is the difference between VBScript’s + and & operator?