gjej x ne ekuacion kuadratic
x = solve('a*x^2 + b*x + c = 0');
%gjej x ne nje ekuacion te tille
x = solve('p*sin(x) = r');
%gjej x ose y ne ekuacion me 2 variabla
[x,y] = solve('x^2 + x*y + y = 3','x^2 - 4*x + 3 = 0');
%ose gjej te panjohurat a,u,v ne te tille ekuacion
[a,u,v] = solve('a*u^2 + v^2','u - v = 1','a^2 - 5*a + 6');
%ose keshtu!
[x,y] = solve('sin(x+y)-exp(x)*y = 0','x^2-y = 2')
% derivati i x^3 sa eshte?
diff(x^3);
%integrali i x^3? Mos harro boundary!!!!!!!!!!!
int(x^3);
%me ekuacionet diferenciale;
y = dsolve('Dy = -a*y') %%%'D
%% konditat e para(si thuhet ne shqip initial conditions?)
y = dsolve('Dy = -a*y','y(0) = 1');
%with second derivative
y = dsolve('D2y = -a^2*y', 'y(0) = 1, Dy(pi/a) = 0')
% A nonlinear equation produces two solutions in a vector.
y = dsolve('(Dy)^2 + y^2 = 1','y(0) = 0')
%ose generate a possibly familiar test matrix, the 5-by-5 Hilbert matrix.
H = sym(hilb(5))
H =
[ 1, 1/2, 1/3, 1/4, 1/5]
[ 1/2, 1/3, 1/4, 1/5, 1/6]
[ 1/3, 1/4, 1/5, 1/6, 1/7]
[ 1/4, 1/5, 1/6, 1/7, 1/8]
[ 1/5, 1/6, 1/7, 1/8, 1/9]
% The determinant
d = det(H);
% Find the characteristic polynomial.
p = poly(H);
% Try to factor the characteristic polynomial just found.
factor(p);
% Compute 50 digit numerical approximations to the eigenvalues.
digits(50);
e = eig(vpa(H)); |
|
 |
|