Check for missing argument or incorrect argument data type in call to function 'head' - using Matlab R2020a
30 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Emanuele Guerrazzi
am 28 Feb. 2022
Beantwortet: Steve Eddins
am 28 Feb. 2022
Just try to create
x = 1:100
and then to use
head(X)
I got the following error message:
"Check for missing argument or incorrect argument data type in call to function 'head'."
using MATLAB R2020a.
Can someone help me?
Thanks
0 Kommentare
Akzeptierte Antwort
Steve Eddins
am 28 Feb. 2022
The function head is only defined for an input that is a table, a timetable, or a tall array.
When trying to execute your code, MATLAB sees that there is a method available called head, but that it is not defined for the argument you called it with. The error message is trying to suggest, then, that your input argument is the incorrect type, or that you have perhaps omitted an input argument that is the correct type, such as a table.
If you want to see just the first few elements of an ordinary vector, like your variable x, then index into it like this:
x = 1:100;
x(1:10)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!