summaryrefslogtreecommitdiff
path: root/3547/CH2/EX2.4/Ex2_4.sce
blob: 1d99edc690daf567cc2851dcd99c0bff7de4cabc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Example 2.4
// a)To convert transmitted power into dBm b)To convert received power into mW
// Page no. 61

clc;
clear;

// Given data
Ptr=0.012;                               // Transmitted power in watt 
PrdBm=-5;                                // Received power in dBm

// a)To convert transmitted power into dBm
PtrdBm=10*log10(Ptr/(10^-3));            // Transmitted power in dBm

// Displaying the result in command window
printf('\n Transmitted power = %0.2f dBm',PtrdBm);

// b)To convert received power into mW
PrmW=10^(-5/10);                        // Received power in mW

// Displaying the result in command window
printf('\n Received power = %0.4f mW',PrmW);