Given a feedback control system with an unknown plant, the problem of choosing a stabilizing controller is considered. Working within the framework of unfalsified adaptive control, we consider a finite-dimensional linear time invariant system as a special case of the standard adaptive configuration. A fading memory cost function is presented in which the influence of older data is reduced exponentially. With this cost function, the location of the poles can be detected with only input-output data. Compared with existing results, the cost function can detect changes affecting stability sooner and be used in adaptive switching control to improve the performance of controller switching.