Undefined function '[name function]' for input arguments of type 'double'. for vector?
이전 댓글 표시
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
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!