Clear Filters
Clear Filters

how to assign different parameters(like bit rate etc) to the elements of a matrix??

1 view (last 30 days)
how to assign different parameters(like bit rate etc) to the elements of a matrix??
  4 Comments
dpb
dpb on 17 Feb 2022
"i hope now i am cleary explianed.."
Unfortunately, no, it's not at all clear to me how any of the above three variables A, U, Cslot are related when just tossed out in isolation and what it is you're trying to do.
If the 12 in the A array size is trying to represent a bit pattern, then you would have to manipulate the individual elements of each array element; MATLAB doesn't implement a bit array. But, the string 1111100000000 isn't 12 but 13 "bits" if that is what it is intended to represent, either, so that also doesn't make any sense.
Show an example of what you have as input and what you would expect as output and the logic by which you get from one to the other. Doesn't have to have working MATLAB code, but we do need to be able to find out what is a working problem definition to be able to solve the problem.
VASUNDHARA V
VASUNDHARA V on 17 Feb 2022
  1. First i initialize A matrix having 12 rows and 120 columns ( in this 12 are the links in the 4 node network topology and 120 shows the spectrum slots) and this 'A' matrix is in the form of 1's and 0's , as 1 represent spectrum is occupied and 0 represents spectrum slot is free. and i assume that the slot width (Cslot) as 12.5 Ghz.
  2. Now, i have taken another variable as 'U' which takes the spectrum allocation requests say 1000 requests thats why i assigned u in the form of array from 1 :1000. and those 1000 requests are like 20 ghz, 12ghz,10 ghz,50 ghz etc.
  3. Now i want to assign and allocate these above requests in the A matrix in place of 0's because 0 represents slot is free. But allocation in A matrix should be done intelligently as according to the slot width .for ex if suppose 50 ghz request come then 5 slots are required to fulfill it so like that i have to do..
  4. i want to know whether i have to do it element by elemnt for this or is there any other method to allocate it in one step as slots are 120 and requets are 1000.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!