Undefined function 'extractfield' for input arguments of type 'struct' in MATLAB R2023a
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello Guys,
i just wanted to use the extractfield function in MATLAB as i used to do it yesterday. After upgrading from Version 2022b to 2023a today morning, it gives me an error in the exact same code which was running perfectly yesterday.
Undefined function 'extractfield' for input arguments of type 'struct'.
Does anyone else have this error with the new Version? Is there maybe a new function in 2023a for extracting information out of a struct?
Greetings
0 Kommentare
Akzeptierte Antwort
Stephen23
am 28 Mär. 2023
Bearbeitet: Stephen23
am 28 Mär. 2023
"After upgrading from Version 2022b to 2023a today morning, it gives me an error in the exact same code which was running perfectly yesterday."
Most likely because you have the Mapping Toolbox installed in the old version, but you did not install it in the new version. The function EXTRACTFIELD is part of the Mapping Toolbox:
"Is there maybe a new function in 2023a for extracting information out of a struct?"
Nope, because EXTRACTFIELD still works just fine. Of course you could use GETFIELD or dynamic fieldnames and some basic concatenation, which will do much the same thing. For example, where S is your structure array:
F = name of the field that you want
A = [S.(F)];
Which is basically what EXTRACTFIELD does inside anyway.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing 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!