No BSD License  

Highlights from
simbus

from simbus by Sanjai Singh
The DataBus Blockset provides a method for manipulating signals from a vector in SIMULINK.

buslen=bussize(busfilename)
function buslen=bussize(busfilename)
%BUSSIZE Returns the length of all the signals in a DataBus file
%
%Use this file to determine the length of the DataBus vector.
%
%Example:
%
% BusLength=bussize('bus1')
%

%William York, 12/95.
%Copyright (c) 1995 by The MathWorks, Inc.

%$Revision: 1.1 $ $Date: 1997/02/11 20:50:36 $

[Strings,Sizes,str]=busread(busfilename);
if (isempty(Strings))
  errstr=str2mat('Error bus file:',['- ' str]);
  errordlg(errstr,'Error in Bussize');
  error(errstr);
end  
buslen=sum(Sizes);

Contact us at files@mathworks.com