I have a string:
str = Earth is round
How do i add a double quotes in the start and end of it? The result should be :
str = "Earth is round"
I'm using MATLAB 2013 version.
I have a string:
str = Earth is round
How do i add a double quotes in the start and end of it? The result should be :
str = "Earth is round"
I'm using MATLAB 2013 version.
Solution
You can use the following syntax:
res = ['"' 'Earth is round' '"']
Result example
script
['"' 'Earth is round' '"']
'Earth is round'
output
ans = "Earth is round"
ans = Earth is round