Exp 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

TMIE. Dept./ 3rd Year Experiment No.

3
Technical College/Mosul Signal Processing

MATLAB Auxiliary Tools


Introduction:

Many things are commonly doing when MATLAB is used to solve problems, things like addition,
subtraction, multiplication, division, analysis, simulation, plotting, etc. These things need for tools, some
of these tools are mentioned below:

1. 𝑆𝑝𝑒𝑐𝑖𝑎𝑙 𝐶ℎ𝑎𝑟𝑒𝑐𝑡𝑒𝑟: 𝒊 𝒑𝒊
2. 𝑂𝑝𝑒𝑟𝑎𝑡𝑜𝑟 𝑓𝑜𝑟 𝑒𝑥𝑎𝑚𝑝𝑙𝑒𝑠: ∶ + − ∗ / ′ ^ .∗ ./ .^
3. 𝐸𝑙𝑒𝑚𝑒𝑛𝑡𝑎𝑟𝑦 𝑚𝑎𝑡𝑟𝑖𝑥: 𝒐𝒏𝒆𝒔 𝒛𝒆𝒓𝒐𝒔 𝒍𝒊𝒏𝒔𝒑𝒂𝒄𝒆 𝒓𝒂𝒏𝒅
4. 𝐸𝑙𝑒𝑚𝑒𝑛𝑡𝑎𝑟𝑦 𝐹𝑢𝑛𝑐𝑡𝑖𝑜𝑛𝑠: 𝒄𝒍𝒄 𝒄𝒍𝒆𝒂𝒓 𝒂𝒍𝒍 𝒄𝒐𝒔 𝒔𝒊𝒏 𝒆𝒙𝒑 𝒍𝒐𝒈 𝒓𝒆𝒂𝒍 𝒊𝒎𝒂𝒈 𝒔𝒖𝒎 𝒍𝒆𝒏𝒈𝒕𝒉 𝒔𝒊𝒛𝒆
5. 𝐺𝑟𝑎𝑝ℎ𝑖𝑐𝑎𝑙 𝐹𝑢𝑛𝑐𝑡𝑖𝑜𝑛: 𝒇𝒊𝒈𝒖𝒓𝒆 𝒉𝒐𝒍𝒅 𝒐𝒏 𝒉𝒐𝒍𝒅 𝒐𝒇𝒇 𝒑𝒍𝒐𝒕 𝒑𝒐𝒍𝒂𝒓 𝒔𝒕𝒆𝒎 𝒔𝒖𝒃𝒑𝒍𝒐𝒕

Procedure:

1. Insert:
≫ 𝑥 = 𝑙𝑖𝑛𝑠𝑝𝑎𝑐𝑒(0,10,5);
≫ 𝑎 = 𝑥.∗ 𝑥;
≫ 𝑏 = 𝑥 ∗ 𝑥′;
≫ 𝑐 = 𝑥(2) + 𝑖 ∗ 𝑎(2);
≫ 𝑑 = 𝑐′;
≫ 𝑒 = 𝑝𝑖.∗ 𝑜𝑛𝑒𝑠(4,4);
≫ 𝑓 = 𝑟𝑎𝑛𝑑(5,5);

2. Find the results of the following:


𝑦1 = 𝑒𝑥𝑝(0.05 ∗ 𝑝𝑖 ∗ 𝑥), y2 = 𝑠𝑖𝑛(0.2 ∗ 𝑝𝑖 ∗ 𝑥) , 𝑦2 = 𝑟𝑒𝑎𝑙 (𝑐), 𝑦3 = 𝑖𝑚𝑎𝑔(𝑐), 𝑦4 =
𝑙𝑒𝑛𝑔𝑡ℎ(𝑥), 𝑦6 = 𝑠𝑖𝑧𝑒(𝑓), 𝑦7 = 𝑠𝑢𝑚(𝑒)

3. Insert:
≫ 𝑓𝑖𝑔𝑢𝑟𝑒 (1)
≫ 𝑠𝑢𝑏𝑝𝑙𝑜𝑡 (2,1,1)
≫ 𝑝𝑙𝑜𝑡 (𝑥, y1)
≫ 𝑠𝑢𝑏𝑝𝑙𝑜𝑡 (2,1,2)
≫ 𝑝𝑙𝑜𝑡 (𝑥, y2)

Report:

1. Give the details about the usage of elementary function.


2. What are the results of executing commands a through d ?
3. Discuss the results.

6 3rd week

You might also like