|
C++ dasturlash tili c tiliga asoslangan. C esa o'z navbatida b va bcpl tillaridan kelib chiqqan. Bcpl 1967 yilda Martin Richards tomonidan tuzilgan va operatsion sistemalarni yozish uchun mo'ljallangan edi
|
bet | 5/6 | Sana | 26.01.2024 | Hajmi | 0,98 Mb. | | #146468 |
Bog'liq Matritsalarni tashkil etish 1.4. Maxsus matritsalar
COMPAN – xarakterestik ko’phadni matrisa ko’rinishida ifodalash Sintaksisi: C = compan(p) Masalan:
(x-1)(x-2)(x-3) = x3 - 7x + 6 polinomi koiffetsentalaridan tuzilgan vektor p = [1 0 -7 6]; yordamchi massiv quyidagicha bo’ladi:
C = compan(p)
C = 0 7 -6 1 0 0
0 1 0
Mos keluvchi funksiyalar: POLY, POLYVAL, POLYVALM.
HADAMARD – Adamar matritsasi (Hadamard matrix)
Sintaksisi: H = hadamard(n) Masalan:
H = hadamard(8)
H = 1 1 1 1 1 1 1 1
1 -1 1 -1 1 -1 1 -1
1 1 -1 -1 1 1 -1 -1
1 -1 -1 1 1 -1 -1 1
1 1 1 1 -1 -1 -1 -1
1 -1 1 -1 -1 1 -1 1
1 1 -1 -1 -1 -1 1 1
1 -1 -1 1 -1 1 1 -1
Mos keluvchi funksiyalar: HANKEL, TOEPLITZ, COMPAN.
TOEPLITZ – Tiplets matritsasi (Toeplitz matrix) Sintaksisi:
T = toeplitz(c)
T = toeplitz(c, r) Misol:
c=1:4; T = toeplitz(c)
T = 1 2 3 4
1 2 3
2 1 1
3 2 1
VANDER – Vandermond matritsasi (Vandermonde matrix)
Sintaksisi:
V = vander(x)
Misol: x = [1 2 3 4];
V = vander(x)
V = 1 1 1 1
8 4 2 1
27 9 3 1
64 16 4 1
WILKINSON – Uilkenson matritsasi (Wilkinson matrix)
Sintaksisi: W = wilkinson(n) Misol:
W = wilkinson(7)
W = 3 1 0 0 0 0 0
1 2 1 0 0 0 0
0 1 1 1 0 0 0
0 0 1 0 1 0 0
0 0 0 1 1 1 0
0 0 0 0 1 2 1
0 0 0 0 0 1 3
Mos keluvchi funksiyalar: EIG, ROSSER, PASCAL.
-
II. Amaliy qism
Loyiha ishimning mavzusi “Matritsalarni tashkil etish” bu obyektlarni modellashtitirishda juda qo’l keladi.
1-qadam → Dastur ishga tushurilganda 1-rasm konsul oynasi paydo bo’ladi.
Bosh menyuda “Matritsalar” so’zini va keyingi satrda “n=” belgini chiqaramiz. 6 qatordan iborat matritsani chiqarish uchun 6-raqamni kiritamiz.
|
|
Bosh sahifa
Aloqalar
Bosh sahifa
C++ dasturlash tili c tiliga asoslangan. C esa o'z navbatida b va bcpl tillaridan kelib chiqqan. Bcpl 1967 yilda Martin Richards tomonidan tuzilgan va operatsion sistemalarni yozish uchun mo'ljallangan edi
|