5АС-20 КЭМ
BARATOV AZIMBOY SHOKIRBOY O‘G‘LI
MathCad tizimida mustaqil ishlarni bajarish tartibi
№1.1 Topshiriq. Quyida berilgan misollarni MathCad tizimida bajaring .
|
,
|
a = -0,5,
b = 1,7
t = 0,44
|
Bajarilishi:
Ekran ko’rinishi:
№1.2 Topshiriq. Quyida berilgan misolni MathCad tizimida bajaring
Y[(ax-b)xc]x-d,
|
a20, b12, c15, d45, x5;
|
Bajarilishi:
Ekran ko’rinishi:
№1.3 Topshiriq. Quyida berilgan misollarni Mathcad tizimida grafigini chizing (aniqlik h=0.1 qadam)
Bajarilishi:
Ekran ko’rinishi:
Matlab dasturida topshiriqlarni bajarilish tartibi
Tоpshiriq №2.1 MatLAB dasturida dekart koordinatalar sistemasida quyidagi elementar funksiyalar grafikliarini yasang:
Bajarilishi:
|
Natija:
|
>> x=[-pi:0.01:pi];
>> f=sin(x.^2);
>> g=cos(x.^2);
>> plot(x,f,x,g)
|
|
Ekran ko’rinishi:
Tоpshiriq №2.2 Fazoda quyidagi funksiyalar grafikliarini yasang:
Bajarilishi:
|
Natija:
|
>> [x,y]=meshgrid(0:0.1:pi, -1:0.1:1);
>> z =((sin(x-2.*y)).^2).*exp(-abs(y));
>> mesh(x,y,z)
|
|
Ekran ko’rinishi:
Tоpshiriq №2.3. Quyidаgi matritsalarning determinantini, teskarisini hisоblаsh dаsturi tuzilsin.
Bajarilishi:
>> A=[1 1 -6 4; 3 -1 -6 -4; 2 3 9 2; 3 2 3 8]
A =
1 1 -6 4
3 -1 -6 -4
2 3 9 2
3 2 3 8
>> det(A)
ans =
-720
>> inv(A)
ans =
-0.1250 0.2083 -0.0000 0.1667
0.4750 -0.0583 0.4000 -0.3667
-0.1250 -0.0139 -0.0000 0.0556
-0.0250 -0.0583 -0.1000 0.1333
Ekran ko’rinishi:
C++ dasturida topshiriqlarni bajarilishi tartibi
Tоpshiriq №3.1 Quyida berilgan misolni blok semasini tuzing
1
|
,
|
a = 1,5, b = 3,14; X = 0,5
|
C++ da chiziqli dastur tuzing va natijasini oling.
1
|
|
a = 1,5; b = 3,14; X = 0,5
|
Dastur matni:
#include
#include
using namespace std;
int main()
{ double a,b,x,S;
a = 1.5;
b = 3.14;
x = 0. 5;
S=(pow(x,3)*pow(x+b,2))+(a/sqrt(x+b)) ;
cout<<"S="< |
Javob:
S=2.44241
|
EKRAN KO’RINISHI:
Tоpshiriq №3.2 Quyida berilgan misolni blok semasini tuzing
2
|
|
x 2,1
2,1< x 4
x >
4
|
ha
ha
yo’q
yo’q
C++ da tarmoqlanuvchi dastur tuzing va natijasini oling.
2
|
|
x 2,1
2,1< x 4
x >
4
|
Dastur matni:
#include
#include
using namespace std;
int main()
{double x,y;
cout<<"x="; cin>>x;
if (x<=2,1) {y=3.2+log(abs(pow(x,2)+1));}
else if (x>4) {y=0.1+sin(x);}
else { y=pow(10,-3)+tan(pow(x,2)+3.5);}
cout<<"y="<
|
Javob: x=1.67; y=3.89315
|
Javob: x=2.88; y=4.80944
|
Javob: x=4.44 ; y=6.03321
|
Ekran ko’rinishi:
Tоpshiriq №3.3 Quyida berilgan misolni blok semasini tuzing
C++ da takrorlanuvchi dastur tuzing va natijasini oling;
Dastur matni :
#include
#include
using namespace std;
int main()
{ int i;
double p=1;
for(i=1;i<=7;i++)
{ p=p*((log(2*i)/log(pow(i,2)+1)))/(i*i-2); }
cout<<"p="<
return 0; }
javob: p=-2.24049e-008
Ekran ko’rinishi:
Do'stlaringiz bilan baham: |