Simple Use of Strings
Ältere Kommentare anzeigen
I am simply trying to get through a Tutorial online and am having a problem running a simple string. It is returning the error:Undefined function 'string' for input arguments of type 'char'.
I am typing: >> a = string('Hi how are you') Undefined function 'string' for input arguments of type 'char'.
This is my first time using MatLab. Do I have to engage this feature to use it? I am pretty sure I have it typed in correctly.
3 Kommentare
Steven Lord
am 4 Apr. 2018
What release of MATLAB are you using? If you're not sure, look at the output of the ver function.
Phil Sibley
am 4 Apr. 2018
Different classes of data:
a = {...} % cell array
b = "..." % string
Some functions accept inputs arguments of different classes, some don't. It depends on the function.
By the way, the best place to start to learn MATLAB is here:
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!