انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

المحاضرة الثانية/حاسبات/ Matlab

Share |
الكلية كلية التربية للعلوم الصرفة     القسم  قسم الرياضيات     المرحلة 1
أستاذ المادة اميرة عبدالواحد فنجان الفنجان       24/03/2021 20:57:22
The second lecture is about some functions that applied on matrices to calculate and analysis some mathematical operations. These functions help the researcher and student to find and extract the important information within the matrix such as the biggest and smallest value in matrix and vectors, sum, product, mean and so on for columns and rows. In addition, the statements that extract the individual entry and specifics entries on rows and columns with different locations.


Max function this function returns the maximum elements of an array.
1. M = max(A) returns the maximum elements of an array. If A is a vector, then max(A) returns the maximum of A. If A is a matrix, then max(A) is a row vector containing the maximum value of each column.

2. M = max(A,[],dim) returns the maximum element along dimension dim. For example, if A is a matrix, then max(A,[],2) is a column vector containing the maximum value of each row.


Example
>> A = [1.7 1.2 1.5; 1.3 1.6 1.99] A = 2×3

1.7000 1.2000 1.5000
1.3000 1.6000 1.9900

>> M = max(A,[],2) M = 2×1

1.7000 1.9900


Min function this function returns the minimum elements of an array.
1. M = min(A) returns the minimum elements of an array. If A is a vector, then min(A) returns the minimum of A. If A is a matrix, then min(A) is a row vector containing the minimum value of each column.


Example
>> A = [23 42 37 15 52];
>> M = min(A)
M = 15

>> B = [2 8 4; 7 3 9]
B = 2×3

2 8 4
7 3 9


>> N = min(B)
N = 1×3

2 3 4

2. M = min(A,[],dim) returns the minimum element along dimension dim. For example, if A is a matrix, then min(A,[],2) is a column vector containing the minimum value of each row.
Example
>> A = [1.7 1.2 1.5; 1.3 1.6 1.99]

>> A = 2×3

1.7000 1.2000 1.5000
1.3000 1.6000 1.9900

>> M = min(A,[],2) >> M = 2×1

1.2000 1.3000



Mean function this function returns the mean or average of an array. For a random variable vector A made up of N scalar observations, the mean is defined as:



1. M = mean(A) returns the mean of the elements of A along the first array dimension whose size does not equal 1. If A is a vector, then mean(A) returns the mean of the elements. If A is a matrix, then mean(A) returns a row vector containing the mean of each column.

Example
>> A = [0 1 1; 2 3 2; 1 3 2; 4 2 2]

A = 4×3

0 1 1
2 3 2
1 3 2
4 2 2

>> M = mean(A)

M = 1×3

1.7500 2.2500 1.7500

2. M = mean(A,dim) returns the mean along dimension dim. For example, if A is a matrix, then mean(A,2) is a column vector containing the mean of each row.

Example:

>> A = [0 1 1; 2 3 2]


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم