PDA

查看完整版本 : [MATLAB基础] 求助:input type undefine


lycrious
2010-06-06, 10:22
function y = convert(moles,type,extradata)
if strcmp(type,'mass') == 1
y = extradata*moles;
elseif strcmp(type,'volume_gas') == 1
y = moles*24.71;
elseif strcmp(type,'concentration') == 1
y = moles/extradata;
end
return

这是一道题目的准确答案
但是当我运行时总是说 input type undefine
这是怎么回事
还有那个strcmp和return是个什么东西
作用和格式是什么