DeepMIMO Forum

Cannot open the dat...
 
Notifications
Clear all

Cannot open the datafile


Krittin Chaowakarn
 Krittin Chaowakarn
(@Krittin Chaowakarn)
Guest
Joined: 5 months ago
Posts: 1
Topic starter  

In DeepMIMOv2, I have been trying to open the datafiles - O1_28 and O1_3p5 - by using dataPrep.m function, as seen below.

 

function [dataset,options] = dataPrep(fileName,options)
%=========================================================================%
% dataPrep is data preparing function.
% INPUTS:
% fileName: a single-field data struct with data
% file paths.
% options: a MATLAB structure with the experiment settings
% OUTPUTS:
% dataset: dataset structure for training and validataion data
% options: updated options structure
%=========================================================================%
len = length(fileName);
d = {};
loc = {};
labels = {};
for i = 1:len % Normalize data
        load(fileName(i).name)
        x = rawData.channel;
        loc(i) = {rawData.userLoc};
        if strcmp( options.case, 'NLOS' )
                labels(i) = {rawData.labels};
        end
        d(i) = {x};
end
 
dataset.data = d;
dataset.userLoc = loc;
dataset.labels = labels;
clear d loc labels
Loc');
 
 
 
 
Also, the dataPrep.m function is used in the main.m file in this part.
 
% Prepare dataset:
% ----------------
options.transPower = tx_power(p);options
fileName = struct('name',{options.dataFile1,...
                                       options.dataFile2});
[dataset,options] = dataPrep(fileName, options);% dataset is a 1x2 structure array
 
 
options.dataFile1 is O1_28
options.dataFile2 is O1_3p5
 
 
I got this error from running the main.m file

Error using load
Unable to read file 'O1_28'. Input cannot be a directory.

Error in dataPrep (line 18)
load(fileName(i).name)

Error in main (line 94)
[dataset,options] = dataPrep(fileName, options);% dataset is a 1x2 structure array

 
 
Thanks in advance

QuoteSolved
Topic Tags
udemirhan
(@udemirhan)
Member Moderator
Joined: 1 year ago
Posts: 27
 

Hi @Krittin Chaowakarn,

 

As mentioned in the repository as the first step, you first need to generate these datasets and save them as a ".mat file". I think you may have missed this step.

 

Regards,

Umut


ReplyQuote

Leave a reply

Author Name

Author Email

Title *

Maximum allowed file size is 2MB

 
Preview 0 Revisions Saved
Share: