Fuel cell and battery management simulation using MATLAB