MATLAB: How can i convert the content of a character array to a variable name convert character to variable Hi, I have a character variable called xx=Hello. I want to convert that xx variable to a matrix name variable named Hello. How can I do this? Best Answer Generally, you should not do what you are trying to do. One possible solution is to use a struct.xx='Helo';myStruct.(xx)=magic(5); Related SolutionsMATLAB: How can the output of a order character string stored in a variable Hi xosro,I'm not sure if this is what you want, butnames = {A(1:2).name}collects the names into a cell array (or {A.names} if you want all).Titus MATLAB: How to create a variable length string in MATLAB % Create StringMyStr = 'abcd';% Change laterMyStr = 'lmnopqrst'; Related QuestionSymbol from stringVariable name length exceeds 63 charactersHow to convert a 2-D char to stringSetting variable names from a character arrayHow to find prefix in a sting
Best Answer