Undefined function '[name function]' for input arguments of type 'double'. for vector?
Mostrar comentarios más antiguos
Hi,
To do some calculations on sprint data I wrote a simple script, underneath is a part of it. It runs fine till the calculation of the T1SprintBestMomentum10m. Some how I get the ERROR
"Undefined function 'T1SprintBestSplit10m' for input arguments of type 'double'."
and I have no idea how to fix it, because there is no difference between the first for loop and the second one and it works fine for the T1SprintBestMomentum5m. All files are in the same directory and the T1SprintBest10m is not a function... Could someone help me with this problem? (I already tried to close matlab and to shutdown my laptop and start it again, it doesn't work)
--------------------------------
% Calculate Velocities of Best Sprint in m/s SprintDistanceRun=30; T1SprintBestVelocity5m(1:length(T1SprintBestTime),1)= zeros; T1SprintBestVelocity10m(1:length(T1SprintBestTime),1)= zeros; T1SprintBestVelocity20m(1:length(T1SprintBestTime),1)= zeros; T1SprintBestVelocity30m(1:length(T1SprintBestTime),1)= zeros;
for i=1:length(T1SprintBestTime)
T1SprintBestVelocity5m(i,1)= SprintDistanceRun/T1SprintBestSplit5m(i);
T1SprintBestVelocity10m(i,1)= SprintDistanceRun/T1SPrintBestSplit10m(i);
T1SprintBestVelocity20m(i,1)= SprintDistanceRun/T1SPrintBestSplit20m(i);
T1SprintBestVelocity30m(i,1)= SprintDistanceRun/T1SprintBestTime(i);
end
%Calculate Momentums of Best Sprint in Ns T1BodyMass=SprintData(:,2);
T1SprintBestMomentum5m(1:length(T1SprintBestTime),1)= zeros; T1SprintBestMomentum10m(1:length(T1SprintBestTime),1)= zeros; T1SprintBestMomentum20m(1:length(T1SprintBestTime),1)= zeros; T1SprintBestMomentum30m(1:length(T1SprintBestTime),1)= zeros;
for i=1:length(T1SprintBestTime)
T1SprintBestMomentum5m(i,1)= T1SprintBestSplit5m(i,1)*T1BodyMass(i);
T1SprintBestMomentum10m(i,1)= T1SprintBestSplit10m(i,1)*T1BodyMass(i);
T1SprintBestMomentum20m(i,1)= T1SprintBestSplit20m(i,1)*T1BodyMass(i);
T1SprintBestMomentum30m(i,1)= T1SprintBestTime(i,1)*T1BodyMass(i);
end
Respuesta aceptada
Más respuestas (1)
Laura
el 11 de Mzo. de 2015
0 votos
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!