Undefined function or method 'debit' for input arguments of type 'double'.
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Image Analyst
on 2 Apr 2015
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 Comments
Image Analyst
on 3 Apr 2015
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.
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!