-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from Sonohi/issue99LivePlotting
Fixed plotting
- Loading branch information
Showing
6 changed files
with
83 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
function plotAssociationTable(Users, Cells, Config) | ||
LayoutFigure = Config.Plot.LayoutFigure; | ||
%clear table if present | ||
tableAssociation = findobj(LayoutFigure, 'Tag', 'table'); | ||
if ~isempty(tableAssociation) | ||
delete(tableAssociation); | ||
end | ||
|
||
%New table | ||
tableAssociation = cell(Config.Ue.number ,3); | ||
tIndex= 1; | ||
for iCell = 1:length(Cells) | ||
Cell = Cells(iCell); | ||
% Find all scheduled users in DL | ||
|
||
scheduledusers = [Cell.ScheduleDL.UeId]; | ||
scheduledusers = unique(scheduledusers(scheduledusers ~= -1)); | ||
|
||
for user = 1:length(scheduledusers) | ||
rxObj = Users(find([Users.NCellID] == scheduledusers(user))); | ||
tableAssociation{tIndex,1} = strcat('UE ', num2str(rxObj.NCellID)); | ||
tableAssociation{tIndex,2} = 'Scheduled at'; | ||
tableAssociation{tIndex,3} = strcat('BS ', num2str(Cell.NCellID)); | ||
tIndex = tIndex+1; | ||
end | ||
|
||
% Plot all associated users (available in Users) | ||
associatedusers = [Cell.Users.UeId]; | ||
associatedusers = associatedusers(associatedusers ~= -1); | ||
if ~isempty(associatedusers) | ||
associatedusers = associatedusers(~ismember(associatedusers,scheduledusers)); | ||
for user = 1:length(associatedusers) | ||
rxObj = Users(find([Users.NCellID] == associatedusers(user))); | ||
tableAssociation{tIndex,1} = strcat('UE ', num2str(rxObj.NCellID)); | ||
tableAssociation{tIndex,2} = 'Associated to'; | ||
tableAssociation{tIndex,3} = strcat('BS ', num2str(Cell.NCellID)); | ||
tIndex = tIndex+1; | ||
end | ||
end | ||
end | ||
uit = uitable(LayoutFigure); | ||
uit.Tag = 'table'; | ||
uit.Data = tableAssociation; | ||
uit.Position = [700 100 300 300]; | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters