I would like to make a list of strings in MATLAB using the example below:
x = ['fun', 'today', 'sunny']
I want to be able to call x(1)
and have it return 'fun'
, but instead I keep getting 'f'
.
Also, is there a way to add a string to a list without getting the list giving back a number where the string should be? I have tried using str2double
and a few other things. It seems like both of these thing should be possible to do in MATLAB.