Initial commit

This commit is contained in:
2025-10-10 17:29:33 +08:00
commit 49047b316d
47 changed files with 323 additions and 0 deletions

15
ifelse.m Normal file
View File

@@ -0,0 +1,15 @@
% x=input('please type a number \n');
% if fix(x) == x
% disp(x);
% end
a = input('a=?');
b = input('b=?');
c = input('c=?');
d = b * b - 4 * a * c ;
if d > 0
x = [(-b + sqrt(d))/(2 * a),(-b - sqrt(d))/(2 * a)];
disp(['x1=',num2str(x(1)),'x2=',num2str(x(2))]);
else
disp(' ');
end