Umal-qura university


-------------------------TASK



Yüklə 0,73 Mb.
səhifə5/30
tarix23.12.2023
ölçüsü0,73 Mb.
#156716
1   2   3   4   5   6   7   8   9   ...   30
Signal and Systems Manual - v2full

-------------------------TASK 01--------------------------
Matlab stores numeric data as double‐precision floating point by default. To store data as an 8‐ bit integer, int8 (a conversion function) can be used. Type the sample code in matlab command window:
>> x = 26
>> whos
>> y = int8(x)
>> whos
What difference do you see? State your findings.


-------------------------TASK 02--------------------------


Create logical array “x” of 5 elements by entering a true (1) or false (0) value for each element.


-------------------------TASK 03--------------------------


Create an m‐file to get 10 numbers from user and generate the square of those numbers.


Lab # 2


OBJECTIVES OF THE LAB
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
In this lab, we will cover the following topics:

  • Built in Matrix Functions

  • Indexing Matrices

  • Sub Matrices

  • Matrix element level operations

  • Round Floating Point numbers to Integers

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐




    1. MATRICES

MATLAB works with essentially only one kind of object, a rectangular numerical matrix possibly, with complex entries. Every MATLAB variable refers to a matrix [a number is a 1 by 1 matrix]. In some situations, 1‐by‐1 matrices are interpreted as scalars, and matrices with only one row or one column are interpreted as vectors.


A matrix is a rectangular array of numbers. For example:


3

6

9

2

1

4

8

5

2

8

7

5

1

4

2

3

defines a matrix with 4 rows, 4 columns, and 16 elements.
Example:
Consider the following three equations:






This family of equations can be written in the form , where

Depending on the specific values of coefficients in matrices A and B, there may be:



      1. no solutions to , or

      2. a unique solution to , or

      3. an infinite number of solutions to In above example, the solution matrix is






      1. Yüklə 0,73 Mb.

        Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   ...   30




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə