主题: [MATLAB基础] 求助:input type undefine
查看单个帖子
旧 2010-06-06, 10:22   #1
lycrious
初级会员
 
注册日期: 2010-06-06
年龄: 25
帖子: 1
声望力: 0
lycrious 正向着好的方向发展
默认 求助:input type undefine

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是个什么东西
作用和格式是什么
lycrious 当前离线   回复时引用此帖