Undefined function or method 'debit' for input arguments of type 'double'.
1 次查看(过去 30 天)
显示 更早的评论
Hi am using matlab(R2007a) version.
I created a function and when I try to run it I have this Error shown up
Undefined function or method 'debit' for input arguments of type 'double'.
Here is the function am talking about
function q=debit(i)
T=117;
Tm=30;
for i=0:5:T
if 0<=i<Tm
q=49.56*(i/2.79)^2;
elseif Tm<i<T
q=49.56*(8.37*i/5.58)^3;
end;
end;
can anybody help me please?
0 个评论
回答(1 个)
Image Analyst
2015-4-2
How are you calling debit? Green "run" arrow/triangle on tool ribbon, F5 key, or typing something on the command line? What are you passing in for i? And why are you even passing in anything for i when you just redefine it as the loop index in a "for" loop? You never even do anything with the i that you passed in.
2 个评论
Image Analyst
2015-4-3
It wasn't really an "Answer" so much as questions. Questions to clarify your situation so people can figure out what you did and how to correct it so that everything will work for you as intended.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!