Given the file messages.dat [ https://drive.google.com/open?id=1V4uRvNoqwsxpVKAl
ID: 2249499 • Letter: G
Question
Given the file messages.dat [ https://drive.google.com/open?id=1V4uRvNoqwsxpVKAlvdvIlX-3XqxFMXHn ]that consists of four columns:
message number | payload bits | jitter | deadline/period
Using the MATLAB ‘load’ command, this file can be turned into a MATLAB matrix whose columns correspond to the file columns.
Perform the following tasks:
1) Write a MATLAB function that computes and returns the required bits/message and number of bits/second for each of the messages in the file. In this case you can have the function return a new matrix with two new columns.
Bits/message = [(54 +8*Sm)/4]+67+8*Sm,
Where Sm = “payload bits”/8 (round up to magnitude of two numbers: 1, 2, 4, 8, 16… and so on)
Bits/second = Bits/message * [1000/“deadline/period”]
2) Write a MATLAB function that ranks the messages in the file by priority (highest priority first) using deadline monotonic scheduling. In this case you can have the function return a new matrix whose rows have changed location based on priority.
[“deadline monotonic scheduling” means: order the items with respect to the “deadline/period” column. Shortest to the longest time]
Explanation / Answer
I= imread('1.jpeg);
J=imread('2.jpeg)
save imgs.mat
a="I";
syntax
str=computer
archstr=computer('arch')
[str,maxsize]=computer
[str,mazsize,endian]=computer;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.