max function is missing in the @logical file on 'matlab' toolbox
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello all,
I am facing a strange problem and I have not seen any possible solution for it on the web except a very loose and general solution which is re-installing a toolbox.
I am using the built-in max function in my code and matlab returns an error saying: Undefined function 'max' for input arguments of type 'struct'.
As you expected, I have surfed the web and applied EVERY possible and proposed solution but unfortunately nothing worked. I checked everything guys.
So, I typed: which max and it returns this:
built-in (C:\Program Files\MATLAB\R2013b\toolbox\matlab\datafun\@logical\max) % logical method
and I tracked this path and surprisingly I did not find the @logical file in this path!!
as a possible solution: I uninstalled and re-installed matlab again in a hope for the @logical file to be re-established but unfortunately the problem still persisting. I also updated the toolbox.
Note: My code was running WITH absolutely NO problem and it hasn't been modified at all. All files are in the directory and there is no path issues.
Summary of the problem:
1- @logical file is missing which belongs to 'matlab' toolbox (the toolbox name is matlab). 2- The toolbox of @logical is installed and its name is matlab. 3- My matlab version is R2013b.
0 Kommentare
Antworten (1)
per isakson
am 31 Aug. 2014
Bearbeitet: per isakson
am 31 Aug. 2014
Firstly try
which max -all
which shows that there are max for many types of data, but not for struct.
Secondly, what do you expect that max(a_struct) should return?
"Note: My code was running WITH absolutely NO problem [...]"   Are you really sure that there isn't something else that causes the problem?
Could it be that some function, which used to return e.g a double array, now returns a struct?
2 Kommentare
per isakson
am 31 Aug. 2014
Bearbeitet: per isakson
am 31 Aug. 2014
I bet wav_index wasn't a struct when your code run in the previous release. With Matlab you cannot be sure.
wav_index, isn't that a strange name for a struct. "Index" indicates a vector of whole numbers.
How is wav_index assigned its value?
Siehe auch
Kategorien
Mehr zu Startup and Shutdown 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!