Built-in min() function has stopped working.

20 次查看(过去 30 天)
Something has caused my minimum function to quit working out of the blue. I was working in 2011b. With a vector of double-precision data, max(data) returns the maximum value and min(data) returns the error "Index exceeds matrix dimensions."
I tested it on other vector data that I generated with data = randi(100,1) and with data = 1:1:100; same results.
I restarted Matlab and the computer and it still happens. I installed a fresh copy of 2013b and it still happens. What could be going on here?
  3 个评论
John
John 2014-4-4
>> which min -all min is a variable. built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun@logical\min) % Shadowed logical method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@char\min) % Shadowed char method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@double\min) % Shadowed double method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@uint8\min) % Shadowed uint8 method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@uint16\min) % Shadowed uint16 method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@uint32\min) % Shadowed uint32 method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@uint64\min) % Shadowed uint64 method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@int8\min) % Shadowed int8 method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@int16\min) % Shadowed int16 method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@int32\min) % Shadowed int32 method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@int64\min) % Shadowed int64 method built-in (C:\Program Files\MATLAB\R2011b\toolbox\matlab\datafun\@single\min) % Shadowed single method C:\Program Files\MATLAB\R2011b\toolbox\distcomp\parallel\@codistributed\min.m % Shadowed codistributed method C:\Program Files\MATLAB\R2011b\toolbox\mbc\mbcmodels\@localpspline\min.m % Shadowed localpspline method C:\Program Files\MATLAB\R2011b\toolbox\mbc\mbcmodels\@localpoly\min.m % Shadowed localpoly method C:\Program Files\MATLAB\R2011b\toolbox\shared\statslib\@ordinal\min.m % Shadowed ordinal method C:\Program Files\MATLAB\R2011b\toolbox\matlab\timeseries\@timeseries\min.m % Shadowed timeseries method

请先登录,再进行评论。

采纳的回答

John
John 2014-4-4
My apologies - stupid mistake has been located. A variable representing minutes shares the function name "min".

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numeric Types 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by