函数的调用
function [ x1 x2 ] = Untitled10( a,b,c )
%UNTITLED10 此处显示有关此函数的摘要
% 此处显示详细说明
d = bb - 4a*c;
if d < 0
‘no’
elseif d == 0
x1 = (-a+sqrt(d))/2;
ans = x1
else
x1 = (-a+sqrt(d))/2;
x2 = (-a-sqrt(d))/2;
ans=[x1 x2]
end
函数的调用
function [ x1 x2 ] = Untitled10( a,b,c )
%UNTITLED10 此处显示有关此函数的摘要
% 此处显示详细说明
d = bb - 4a*c;
if d < 0
‘no’
elseif d == 0
x1 = (-a+sqrt(d))/2;
ans = x1
else
x1 = (-a+sqrt(d))/2;
x2 = (-a-sqrt(d))/2;
ans=[x1 x2]
end