# dalsi matematika
clear
clc
printf ("Reseni soustavy linearnich rovnic\n");
printf ("4x+3y-2z=40\n");
printf ("6x-5y-3z=50\n");
printf ("3x+2y+5z=220\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
printf ("Matice A z koeficientu\n");
A=[4 3 -2;6 -5 3;3 2 5]
printf ("Matice B z pravych stran\n");
B=[40;50;220]
printf ("a reseni x,y,z \n");
A\B
printf ("Stisknete libovolnou klavesu...\n");
pause
clc;
printf ("Dalsi operace s matici A\n");
A
printf ("Matice transponovana\n");
A'
printf ("Stisknete libovolnou klavesu...\n");
pause
printf ("Vyber prvku: A(2,3) \n");
A(2,3)
printf ("Vyber 3. radku: A(3,:) \n");
A(3,:)
printf ("Vyber 2. sloupce: A(:,2) \n");
A(:,2)
printf ("Determinant: det(A) \n");
det(A)
#################################################
printf ("Stisknete libovolnou klavesu...\n");
pause
clc
printf ("Prace s polynomy\n");
printf ("Kvadraticka rovnice 4x^2+x-3=0\n");
printf ("Zadame koeficienty: koeficienty=[4 1 -3]\n");
koeficienty=[4 1 -3]
printf ("Muzeme vypsat rovnici: polyout(koeficienty, 'x')\n");
polyout(koeficienty, 'x')
printf ("Stisknete libovolnou klavesu...\n");
pause
printf ("a resime ...: roots(koeficienty)\n");
roots(koeficienty)
printf ("Stisknete libovolnou klavesu...\n");
pause
clc;
printf ("Naopak najdeme rovnici ke znamym korenum\n");
printf ("poly([0.9, -.7])\n");
poly([0.9, -.7])
printf ("Stisknete libovolnou klavesu...\n");
pause
printf ("Deleni a nasobeni polynomu\n");
printf ("x^4-8x^3+16x^2-7x-2\n");
printf ("x^2-3x+2\n");
printf ("Zadame koeficienty: koef1=[1 -8 16 -7 -2]\n");
printf ("Zadame koeficienty: koef2=[1 -3 2]\n");
koef1=[1 -8 16 -7 -2]
koef2=[1 -3 2]
printf ("Stisknete libovolnou klavesu...\n");
pause
printf ("Nasobeni: conv(koef1,koef2)\n");
conv(koef1,koef2)
printf ("Deleni: [podil, zbytek]=deconv(koef1,koef2)\n");
[podil, zbytek]=deconv(koef1,koef2)
printf ("Vysledny polynom: polyout(podil, 'y')\n");
polyout(podil, 'y')

