No BSD License  

Highlights from
GUI for the performance analysis of pedelecs

image thumbnail
from GUI for the performance analysis of pedelecs by Jan Cappelle
Modeling the behaviour of electric bicycles

Readdatamode2(xlsfile,sheet)
function [tradata testdata] = Readdatamode2(xlsfile,sheet)

%Readdatamode(xlsfile)
%Readdata reads measurement data of a pedelec and prepares them for LSSVM
%The xlsfile:
%The first colums are the measured speeds in m/s
%The secund columns are the measured torques in Nm
%The third columns are the measured traction forces in N


data=xlsread(xlsfile,sheet);
aantalmetingen=size(data,1);
%data opsplitsen in 3 vectoren x, y, en z (nonuniformly sampled data)
x=data(1:aantalmetingen,1)*3.6; 	               
y=data(1:aantalmetingen,3);						
z=data(1:aantalmetingen,2);						
%echte data bewaren
alledata=[x y z];

%Bepalen van de trainingsset en de dataset
p=randperm(aantalmetingen);
for k=1:length(p)
    alledatap(k,:)=alledata(p(k),:);
end
n=0.75;
tradata=alledatap(1:floor(n*length(p)),:);
testdata=alledatap(floor(n*length(p))+1:length(p),:);

Contact us at files@mathworks.com