Dot indexing Error Running Script on Matlab Production Server

3 次查看(过去 30 天)
Hello,
I load a .mat file from a script running on Matlab Production Server. The file contains a struct.
Running on my desktop, I can access values in the structure like this:
histo_test = dataset_loaded(3).volfeats_EWM_histo.Values(2:10);
But on Matlab Production Server, that line of code produces this error:
'Dot indexing is not supported for variables of this type.'
I know the the structure loads correcly because the length of the structure is correct.
How can I access the parameters of a structure from a script running on Matlab Production Server?

回答(1 个)

Kojiro Saito
Kojiro Saito 2020-6-26
After reading this question, I think this issue might be because you're loading a mat file with an output argument.
dataset_load = load('dataset_scaled_fixedBins.mat');
So, you can access the original structure data by accessing dataset_load.dataset_load.
dataset_loaded = dataset_load.dataset_load;
histo_test = dataset_loaded(3).volfeats_EWM_histo.Values(2:10);
  2 个评论
Marc McLean
Marc McLean 2020-6-26
Hello Kojiro,
This is my code to load:
dataset_load = load('dataset_scaled_fixedBins.mat');
dataset_loaded = dataset_load.dataset;
dataset_length = size(dataset_loaded);
disp_histo = dataset_loaded(3).volfeats_EWM_histo;
This works fine on my desktop but the last line produces a dot indexing error when compiled and run on Matlab Production Server. However, the third line, dataset_length is the correct length on Matlab Production Server so I believe the dataset is loaded but why does the last line error on Matlab production server but run fine on my desktop?
Kojiro Saito
Kojiro Saito 2020-6-29
Are there any data type difference in MATLAB desktop and MATLAB Production Server?
You can find data types by whos command
dataset_load = load('dataset_scaled_fixedBins.mat');
dataset_loaded = dataset_load.dataset;
dataset_length = size(dataset_loaded);
whos dataset_loaded
And you can find whos results in main.log of Production Server.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by